From a324fc45e4d04e3b879cd2d9a603d73ca696b775 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Wed, 7 Jan 2009 12:15:30 +0100 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- diff-no-index.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/diff-no-index.c b/diff-no-index.c index 12ff1f1ee..60ed17470 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -207,8 +207,10 @@ void diff_no_index(struct rev_info *revs, int j; if (!strcmp(argv[i], "--no-index")) i++; - else if (!strcmp(argv[i], "-q")) + else if (!strcmp(argv[i], "-q")) { options |= DIFF_SILENT_ON_REMOVED; + i++; + } else if (!strcmp(argv[i], "--")) i++; else { -- 2.26.2