summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Thomas Rast <trast@student.ethz.ch>2009-01-07 12:15:30 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-01-07 12:04:38 -0800
commita324fc45e4d04e3b879cd2d9a603d73ca696b775 (patch)
tree421279aeed893913270956aa19c2980d88b05bb9
parentdiff --no-index: test for pager after option parsing (diff)
downloadtgif-a324fc45e4d04e3b879cd2d9a603d73ca696b775.tar.xz
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 <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--diff-no-index.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/diff-no-index.c b/diff-no-index.c
index 12ff1f1eef..60ed17470a 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 {