X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-diff.c;h=9c8c295732bf12990b8324bf75968fd68dd41d59;hb=158629b2c9baffd0352306bd8dfa0784c981955d;hp=d5fe775fc135c0905cabec6731104009ca3bfef3;hpb=ea2408bfe18b4f9d1eaa9d8587c5ae6196552cac;p=git.git diff --git a/builtin-diff.c b/builtin-diff.c index d5fe775fc..9c8c29573 100644 --- a/builtin-diff.c +++ b/builtin-diff.c @@ -74,6 +74,8 @@ static int builtin_diff_b_f(struct rev_info *revs, if (!(S_ISREG(st.st_mode) || S_ISLNK(st.st_mode))) die("'%s': not a regular file or symlink", path); + diff_set_mnemonic_prefix(&revs->diffopt, "o/", "w/"); + if (blob[0].mode == S_IFINVALID) blob[0].mode = canon_mode(st.st_mode); @@ -175,10 +177,8 @@ static int builtin_diff_combined(struct rev_info *revs, if (!revs->dense_combined_merges && !revs->combine_merges) revs->dense_combined_merges = revs->combine_merges = 1; parent = xmalloc(ents * sizeof(*parent)); - /* Again, the revs are all reverse */ for (i = 0; i < ents; i++) - hashcpy((unsigned char *)(parent + i), - ent[ents - 1 - i].item->sha1); + hashcpy((unsigned char *)(parent + i), ent[i].item->sha1); diff_tree_combined(parent[0], parent + 1, ents - 1, revs->dense_combined_merges, revs); return 0;