diff options
author | René Scharfe <l.s.r@web.de> | 2022-09-07 14:45:42 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-09-07 22:36:43 +0300 |
commit | 2b43dd0eb5f3f035b9bd9d019ec405dd55ec15e1 (patch) | |
tree | 92c3fcb6ac0c2d1a20cc7e883c87cff6fe3037df /diff-no-index.c | |
parent | 07a6f94a6d06947d325881460a3798dda0a98cf8 (diff) |
diff-no-index: simplify argv index calculation
Since 16bb3d714d (diff --no-index: use parse_options() instead of
diff_opt_parse(), 2019-03-24) argc must be 2 if we reach the loop, i.e.
argc - 2 == 0. Remove that inconsequential term.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-no-index.c')
-rw-r--r-- | diff-no-index.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/diff-no-index.c b/diff-no-index.c index a18f6c3c63..18edbdf4b5 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -267,7 +267,7 @@ int diff_no_index(struct rev_info *revs, } FREE_AND_NULL(options); for (i = 0; i < 2; i++) { - const char *p = argv[argc - 2 + i]; + const char *p = argv[i]; if (!strcmp(p, "-")) /* * stdin should be spelled as "-"; if you have |