summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 33e5982a1c..798477f7e5 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -202,7 +202,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;
}