diff --relative: help working in a bare repository
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index db4bd557b75b46e64d71f7ce9565065269ac6355..2b89b160078b4b0de9605100889f8cee110715d0 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -2302,6 +2302,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
                options->detect_rename = 0;
        else if (!strcmp(arg, "--relative"))
                DIFF_OPT_SET(options, RELATIVE_NAME);
+       else if (!prefixcmp(arg, "--relative=")) {
+               DIFF_OPT_SET(options, RELATIVE_NAME);
+               options->prefix = arg + 11;
+       }
 
        /* xdiff options */
        else if (!strcmp(arg, "-w") || !strcmp(arg, "--ignore-all-space"))