Skip to content

Commit

Permalink
Merge branch 'jc/fix-diff-no-index-diff-opt-parse'
Browse files Browse the repository at this point in the history
"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()
  • Loading branch information
gitster committed Apr 3, 2014
2 parents 8ba87ad + ad1c3fb commit 7b6bc4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diff-no-index.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7b6bc4d

Please sign in to comment.