git-diff -B output fix.
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index 02a409d9647f1093310a7ab3325fad5c2c3951ad..5dbc913a963eb3ed42d8b05aaf3c87d906931b04 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -333,7 +333,7 @@ static void emit_rewrite_diff(const char *name_a,
        diff_populate_filespec(two, 0);
        lc_a = count_lines(one->data, one->size);
        lc_b = count_lines(two->data, two->size);
-       printf("--- %s\n+++ %s\n@@ -", name_a, name_b);
+       printf("--- a/%s\n+++ b/%s\n@@ -", name_a, name_b);
        print_line_count(lc_a);
        printf(" +");
        print_line_count(lc_b);
@@ -1518,9 +1518,6 @@ int diff_setup_done(struct diff_options *options)
        if (options->find_copies_harder)
                options->detect_rename = DIFF_DETECT_COPY;
 
-       if ((0 <= options->rename_limit && !options->detect_rename)
-               return -1;
-
        if (options->output_format & (DIFF_FORMAT_NAME |
                                      DIFF_FORMAT_NAME_STATUS |
                                      DIFF_FORMAT_CHECKDIFF |