[PATCH] git-cvs2git: create tags
[git.git] / diff-cache.c
index 2aaf16a..e95fd70 100644 (file)
@@ -157,7 +157,7 @@ static void mark_merge_entries(void)
 }
 
 static char *diff_cache_usage =
-"git-diff-cache [-p] [-r] [-z] [-m] [-M] [-C] [-R] [-S<string>] [--cached] <tree-ish> [<path>...]";
+"git-diff-cache [-p] [-r] [-z] [-m] [-M] [-C] [-R] [-S<string>] [-O<orderfile>] [--cached] <tree-ish> [<path>...]";
 
 int main(int argc, const char **argv)
 {
@@ -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")) {