summaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-03 11:50:10 -0700
committerJunio C Hamano <junkio@cox.net>2006-08-03 11:50:10 -0700
commitf82cd3c6104733e2ff3305c325a440731aa1d17c (patch)
treeed35e772ebb58472480e58940a8be46eb2ca5cfd /builtin-diff.c
parentfba0cbd95d796857622d642160176907930ae511 (diff)
downloadgit-f82cd3c6104733e2ff3305c325a440731aa1d17c.tar.gz
Fix "git diff blob1 blob2" showing the diff in reverse.
This was introduced by mistake when revision.c::add_pending_object() was modified to use object-array instead of object-list. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-diff.c')
-rw-r--r--builtin-diff.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index 48d2fd03b7..ec27542d48 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -125,9 +125,6 @@ static int builtin_diff_blobs(struct rev_info *revs,
int argc, const char **argv,
struct blobinfo *blob)
{
- /* Blobs: the arguments are reversed when setup_revisions()
- * picked them up.
- */
unsigned mode = canon_mode(S_IFREG | 0644);
if (argc > 1)
@@ -135,7 +132,7 @@ static int builtin_diff_blobs(struct rev_info *revs,
stuff_change(&revs->diffopt,
mode, mode,
- blob[1].sha1, blob[0].sha1,
+ blob[0].sha1, blob[1].sha1,
blob[0].name, blob[0].name);
diffcore_std(&revs->diffopt);
diff_flush(&revs->diffopt);