X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=diff-cache.c;h=e95fd70da83640d821adb89e97c6fc8b24d649da;hb=001d4a27dbfaaa59c25dc35dafc69bd9b9bc21d3;hp=8e5f72bf3f924ef3c7ebb4e76b871bdf6851caa5;hpb=ce24067549a8554b214e723d7aa4bc063c54409e;p=git.git diff --git a/diff-cache.c b/diff-cache.c index 8e5f72bf..e95fd70d 100644 --- a/diff-cache.c +++ b/diff-cache.c @@ -191,17 +191,20 @@ int main(int argc, const char **argv) continue; } if (!strncmp(arg, "-B", 2)) { - diff_break_opt = diff_scoreopt_parse(arg); + if ((diff_break_opt = diff_scoreopt_parse(arg)) == -1) + usage(diff_cache_usage); continue; } 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_cache_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_cache_usage); continue; } if (!strcmp(arg, "-z")) {