Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2022-10-18 04:04:45 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-18 07:24:03 +0300
commit827f8305c4d5a0300c669dc57cc2920537bba757 (patch)
treeafb97a1f656ede29e598f5034ac9e6ffa96be3fb /git-compat-util.h
parent70aa1d7576830c5efa93953ccded77deb0d7eb25 (diff)
update-index: drop unused argc from do_reupdate()
The parse-options callback for --again soaks up all remaining options by manipulating the parse_opt_ctx's argc and argv fields. Even though it has to look at both, the actual parsing happens via the do_reupdate() helper, which only looks at the argv half (by passing it along to parse_pathspec). So that helper doesn't need to see argc at all. Note that the helper does look at "argv + 1" without confirming that argc is greater than 0. We know this is correct because it is skipping past the actual "--again" string, which will always be present. However, to make what's going on more obvious, let's move that "+1" into the caller, which has the matching "-1" when fixing up the ctx's argc/argv. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
0 files changed, 0 insertions, 0 deletions