mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
revisions: drop unused "opt" parameter in "tweak" callbacks
The setup_revision_opt struct has a "tweak" function pointer, which can be used to adjust parameters after setup_revisions() parses arguments, but before it finalizes setup. In addition to the rev_info struct, the callback receives a pointer to the setup_revision_opt, as well. But none of the existing callbacks looks at the extra "opt" parameter, leading to -Wunused-parameter warnings. We could mark it as UNUSED, but instead let's remove it entirely. It's conceivable that it could be useful for a callback to have access to the "opt" struct. But in the 13 years that this mechanism has existed, nobody has used it. So let's just drop it in the name of simplifying. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
506d35f13d
commit
cc88afad62
@@ -428,7 +428,7 @@ void repo_init_revisions(struct repository *r,
|
||||
*/
|
||||
struct setup_revision_opt {
|
||||
const char *def;
|
||||
void (*tweak)(struct rev_info *, struct setup_revision_opt *);
|
||||
void (*tweak)(struct rev_info *);
|
||||
unsigned int assume_dashdash:1,
|
||||
allow_exclude_promisor_objects:1,
|
||||
free_removed_argv_elements:1;
|
||||
|
||||
Reference in New Issue
Block a user