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>
pull/1206/merge
René Scharfe 3 months ago committed by Junio C Hamano
parent 07a6f94a6d
commit 2b43dd0eb5
  1. 2
      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

Loading…
Cancel
Save