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

Commit 693b407

Browse files
committed
Merge branch 'jc/fix-diff-no-index-diff-opt-parse' into maint
* jc/fix-diff-no-index-diff-opt-parse: diff-no-index: correctly diagnose error return from diff_opt_parse()
2 parents efb4ec6 + ad1c3fb commit 693b407

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
@@ -202,7 +202,7 @@ void diff_no_index(struct rev_info *revs,
202202
i++;
203203
else {
204204
j = diff_opt_parse(&revs->diffopt, argv + i, argc - i);
205-
if (!j)
205+
if (j <= 0)
206206
die("invalid diff option/value: %s", argv[i]);
207207
i += j;
208208
}

0 commit comments

Comments
 (0)