X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-diff.c;h=95d2c699b91411aeea5253ffd6f8a922dddb235f;hb=aedb8995f841949ce29e05ea7e5c03c2d5466089;hp=71742aa10b3b8e2621eecd4be929946b0a308deb;hpb=4ca72f20c382134b85f22fca83472572e5542f4f;p=git.git diff --git a/builtin-diff.c b/builtin-diff.c index 71742aa10..95d2c699b 100644 --- a/builtin-diff.c +++ b/builtin-diff.c @@ -132,7 +132,9 @@ static int builtin_diff_blobs(struct rev_info *revs, int argc, const char **argv, struct blobinfo *blob) { - /* Blobs */ + /* Blobs: the arguments are reversed when setup_revisions() + * picked them up. + */ unsigned mode = canon_mode(S_IFREG | 0644); while (1 < argc) { @@ -145,8 +147,8 @@ static int builtin_diff_blobs(struct rev_info *revs, } stuff_change(&revs->diffopt, mode, mode, - blob[0].sha1, blob[1].sha1, - blob[1].name, blob[1].name); + blob[1].sha1, blob[0].sha1, + blob[0].name, blob[0].name); diffcore_std(&revs->diffopt); diff_flush(&revs->diffopt); return 0;