summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-07-03 06:44:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-07-14 00:24:00 (GMT)
commitcc88afad622b8166563cc6bd68de3155ec558ab0 (patch)
treee697ed0660f81fa02ea2f4616997736321fabcfd /revision.c
parent506d35f13da352975688b078e89cb978d44bf39c (diff)
downloadgit-cc88afad622b8166563cc6bd68de3155ec558ab0.zip
git-cc88afad622b8166563cc6bd68de3155ec558ab0.tar.gz
git-cc88afad622b8166563cc6bd68de3155ec558ab0.tar.bz2
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>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index d66857e..ea5ab59 100644
--- a/revision.c
+++ b/revision.c
@@ -2971,7 +2971,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
if (!revs->def)
revs->def = opt ? opt->def : NULL;
if (opt && opt->tweak)
- opt->tweak(revs, opt);
+ opt->tweak(revs);
if (revs->show_merge)
prepare_show_merge(revs);
if (revs->def && !revs->pending.nr && !revs->rev_input_given) {