提交 7b6bc4d8 编写于 作者: J Junio C Hamano

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()
...@@ -198,7 +198,7 @@ void diff_no_index(struct rev_info *revs, ...@@ -198,7 +198,7 @@ void diff_no_index(struct rev_info *revs,
i++; i++;
else { else {
j = diff_opt_parse(&revs->diffopt, argv + i, argc - i); j = diff_opt_parse(&revs->diffopt, argv + i, argc - i);
if (!j) if (j <= 0)
die("invalid diff option/value: %s", argv[i]); die("invalid diff option/value: %s", argv[i]);
i += j; i += j;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册