From: Junio C Hamano Date: Tue, 16 May 2006 02:06:06 +0000 (-0700) Subject: Merge branch 'jc/diff' into next X-Git-Tag: v1.4.1-rc1~100 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/70bde2bc310e257bd57ed578ac78af1d31437ea6?hp=-c Merge branch 'jc/diff' into next * jc/diff: builtin-diff: fix comparison between two blobs. --- 70bde2bc310e257bd57ed578ac78af1d31437ea6 diff --combined builtin-diff.c index 71742aa10b,b0c9cade02..95d2c699b9 --- a/builtin-diff.c +++ b/builtin-diff.c @@@ -132,7 -132,9 +132,9 @@@ static int builtin_diff_blobs(struct re 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 +147,8 @@@ } 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; @@@ -231,7 -233,7 +233,7 @@@ static int builtin_diff_combined(struc return 0; } -static void add_head(struct rev_info *revs) +void add_head(struct rev_info *revs) { unsigned char sha1[20]; struct object *obj;