summaryrefslogtreecommitdiff
path: root/diff-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'diff-tree.c')
-rw-r--r--diff-tree.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/diff-tree.c b/diff-tree.c
index c3a5617c57..3881c23ca3 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")) {