summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2022-10-06 09:10:53 -0400
committerJunio C Hamano <gitster@pobox.com>2022-10-06 09:56:51 -0700
commit7faba18a9a82b32aeacc5dd5f525764a80640a95 (patch)
treecb3086726e4c4b045d4d320e3801c2672bdb42f5 /builtin/commit.c
parent6823c19888a5d1b68da725bf2093dc1155a50afb (diff)
multi-pack-index: avoid writing to global in option callback
We declare the --object-dir option like: OPT_CALLBACK(0, "object-dir", &opts.object_dir, ...); but the pointer to opts.object_dir is completely unused. Instead, the callback writes directly to a global. Which fortunately happens to be opts.object_dir. So everything works as expected, but it's unnecessarily confusing. Instead, let's have the callback write to the option value pointer that has been passed in. This also quiets a -Wunused-parameter warning (since we don't otherwise look at "opt"). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions