Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 7b6bc4d

Browse files
committed
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()
2 parents 8ba87ad + ad1c3fb commit 7b6bc4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

diff-no-index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ void diff_no_index(struct rev_info *revs,
198198
i++;
199199
else {
200200
j = diff_opt_parse(&revs->diffopt, argv + i, argc - i);
201-
if (!j)
201+
if (j <= 0)
202202
die("invalid diff option/value: %s", argv[i]);
203203
i += j;
204204
}

0 commit comments

Comments
 (0)