[PATCH] diff-stages: support "-u" as a synonym for "-p".
[git.git] / diff-stages.c
index f099814..738fe5d 100644 (file)
@@ -67,7 +67,7 @@ int main(int ac, const char **av)
                const char *arg = av[1];
                if (!strcmp(arg, "-r"))
                        ; /* as usual */
-               else if (!strcmp(arg, "-p"))
+               else if (!strcmp(arg, "-p") || !strcmp(arg, "-u"))
                        diff_output_format = DIFF_FORMAT_PATCH;
                else if (!strncmp(arg, "-B", 2)) {
                        if ((diff_break_opt = diff_scoreopt_parse(arg)) == -1)
@@ -107,7 +107,7 @@ int main(int ac, const char **av)
            ! (0 <= stage1 && stage1 <= 3) ||
            sscanf(av[2], "%d", &stage2) != 1 ||
            ! (0 <= stage2 && stage2 <= 3) ||
-           find_copies_harder && detect_rename != DIFF_DETECT_COPY)
+           (find_copies_harder && detect_rename != DIFF_DETECT_COPY))
                usage(diff_stages_usage);
 
        av += 3; /* The rest from av[0] are for paths restriction. */