aboutsummaryrefslogtreecommitdiffstats
path: root/diff-no-index.c
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2009-01-07 12:15:30 +0100
committerJunio C Hamano <gitster@pobox.com>2009-01-07 12:04:38 -0800
commita324fc45e4d04e3b879cd2d9a603d73ca696b775 (patch)
tree421279aeed893913270956aa19c2980d88b05bb9 /diff-no-index.c
parentc6dbca08ca39d9cd511a36cdd18847b8720f1653 (diff)
downloadgit-a324fc45e4d04e3b879cd2d9a603d73ca696b775.tar.gz
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>
Diffstat (limited to 'diff-no-index.c')
-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 {