X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=diff-tree.c;h=3881c23ca37a86c41ec12b2d5c4713ab01cc9d82;hb=337cb3fb8da45f10fe9a0c3cf571600f55ead2ce;hp=c3a5617c578d3a863b9759967e9583c0c5c944ea;hpb=ce24067549a8554b214e723d7aa4bc063c54409e;p=git.git diff --git a/diff-tree.c b/diff-tree.c index c3a5617c..3881c23c 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -459,16 +459,19 @@ int main(int argc, const char **argv) } if (!strncmp(arg, "-M", 2)) { detect_rename = DIFF_DETECT_RENAME; - diff_score_opt = diff_scoreopt_parse(arg); + if ((diff_score_opt = diff_scoreopt_parse(arg)) == -1) + usage(diff_tree_usage); continue; } if (!strncmp(arg, "-C", 2)) { detect_rename = DIFF_DETECT_COPY; - diff_score_opt = diff_scoreopt_parse(arg); + if ((diff_score_opt = diff_scoreopt_parse(arg)) == -1) + usage(diff_tree_usage); continue; } if (!strncmp(arg, "-B", 2)) { - diff_break_opt = diff_scoreopt_parse(arg); + if ((diff_break_opt = diff_scoreopt_parse(arg)) == -1) + usage(diff_tree_usage); continue; } if (!strcmp(arg, "-z")) {