X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=diff.c;h=2fa285a8efc69fac1ba922b0b7ada9230de93c79;hb=684958ae6162c593bd90ba893271ffb2381c3c44;hp=ce98a90805f881fa9ef161448af22e859db0d93d;hpb=1b83ace35e7869ad77810ab68984b1bf2b8c7038;p=git.git diff --git a/diff.c b/diff.c index ce98a908..2fa285a8 100644 --- a/diff.c +++ b/diff.c @@ -142,11 +142,12 @@ static void copy_file(int prefix, const char *data, int size) static void emit_rewrite_diff(const char *name_a, const char *name_b, - struct diff_filespec *one, + struct diff_filespec *one, struct diff_filespec *two) { - /* Use temp[i].name as input, name_a and name_b as labels */ int lc_a, lc_b; + diff_populate_filespec(one, 0); + 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); @@ -1374,8 +1375,6 @@ static void diffcore_apply_filter(const char *filter) void diffcore_std(struct diff_options *options) { - if (options->paths && options->paths[0]) - diffcore_pathspec(options->paths); if (options->break_opt != -1) diffcore_break(options->break_opt); if (options->detect_rename)