summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-08-31 17:21:46 -0400
committerJunio C Hamano <gitster@pobox.com>2023-09-05 14:48:17 -0700
commit62c5358a5e728d332e4a991c87d9eb0d5161a02a (patch)
tree9bc1c63a083d844ad164d1c7c8b22ff4111601ba /commit.h
parent34bf44f2d50e835a4824a07c139bdececccf4da1 (diff)
merge: do not pass unused opt->value parameter
The option_parse_strategy() callback does not look at opt->value; instead it calls append_strategy(), which manipulates the global use_strategies array directly. But the OPT_CALLBACK declaration assigns "&use_strategies" to opt->value. One could argue this is good, as it tells the reader what we generally expect the callback to do. But it is also bad, because it can mislead you into thinking that swapping out "&use_strategies" there might have any effect. Let's switch it to pass NULL (which is what every other "does not bother to look at opt->value" callback does). If you want to know what the callback does, it's easy to read the function itself. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions