Skip to content

Commit a324fc4

Browse files
trastgitster
authored andcommitted
diff --no-index -q: fix endless loop
We forgot to move to the next argument when parsing -q, getting stuck in an endless loop. Signed-off-by: Thomas Rast <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c6dbca0 commit a324fc4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

diff-no-index.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,10 @@ void diff_no_index(struct rev_info *revs,
207207
int j;
208208
if (!strcmp(argv[i], "--no-index"))
209209
i++;
210-
else if (!strcmp(argv[i], "-q"))
210+
else if (!strcmp(argv[i], "-q")) {
211211
options |= DIFF_SILENT_ON_REMOVED;
212+
i++;
213+
}
212214
else if (!strcmp(argv[i], "--"))
213215
i++;
214216
else {

0 commit comments

Comments
 (0)