diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-15 19:06:06 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-15 19:06:06 -0700 |
commit | 70bde2bc310e257bd57ed578ac78af1d31437ea6 (patch) | |
tree | 15a5e5d85db7eb281c741fc09a5665c2a07a8ddb /builtin-diff.c | |
parent | Merge branch 'master' into next (diff) | |
parent | builtin-diff: fix comparison between two blobs. (diff) | |
download | tgif-70bde2bc310e257bd57ed578ac78af1d31437ea6.tar.xz |
Merge branch 'jc/diff' into next
* jc/diff:
builtin-diff: fix comparison between two blobs.
Diffstat (limited to 'builtin-diff.c')
-rw-r--r-- | builtin-diff.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin-diff.c b/builtin-diff.c index 71742aa10b..95d2c699b9 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; |