summaryrefslogtreecommitdiff
path: root/diff-no-index.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-04-03 12:38:42 -0700
committerJunio C Hamano <gitster@pobox.com>2014-04-03 12:38:42 -0700
commit7b6bc4d8350029fed82824a33ea9039f22788eec (patch)
treecfa3c083958735e0f1b64809aa71db7b24d694ef /diff-no-index.c
parent8ba87adad637b402fb309754e213ec40b74e4f18 (diff)
parentad1c3fbd26d0aae50abfb3c7d654f7229ba9370d (diff)
downloadgit-7b6bc4d8350029fed82824a33ea9039f22788eec.tar.gz
Merge branch 'jc/fix-diff-no-index-diff-opt-parse'
"diff --no-index -Mq a b" fell into an infinite loop. * jc/fix-diff-no-index-diff-opt-parse: diff-no-index: correctly diagnose error return from diff_opt_parse()
Diffstat (limited to 'diff-no-index.c')
-rw-r--r--diff-no-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff-no-index.c b/diff-no-index.c
index c554691df0..265709ba8c 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -198,7 +198,7 @@ void diff_no_index(struct rev_info *revs,
i++;
else {
j = diff_opt_parse(&revs->diffopt, argv + i, argc - i);
- if (!j)
+ if (j <= 0)
die("invalid diff option/value: %s", argv[i]);
i += j;
}