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>
This commit is contained in:
parent
fba0cbd95d
commit
f82cd3c610
@ -125,9 +125,6 @@ static int builtin_diff_blobs(struct rev_info *revs,
|
|||||||
int argc, const char **argv,
|
int argc, const char **argv,
|
||||||
struct blobinfo *blob)
|
struct blobinfo *blob)
|
||||||
{
|
{
|
||||||
/* Blobs: the arguments are reversed when setup_revisions()
|
|
||||||
* picked them up.
|
|
||||||
*/
|
|
||||||
unsigned mode = canon_mode(S_IFREG | 0644);
|
unsigned mode = canon_mode(S_IFREG | 0644);
|
||||||
|
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
@ -135,7 +132,7 @@ static int builtin_diff_blobs(struct rev_info *revs,
|
|||||||
|
|
||||||
stuff_change(&revs->diffopt,
|
stuff_change(&revs->diffopt,
|
||||||
mode, mode,
|
mode, mode,
|
||||||
blob[1].sha1, blob[0].sha1,
|
blob[0].sha1, blob[1].sha1,
|
||||||
blob[0].name, blob[0].name);
|
blob[0].name, blob[0].name);
|
||||||
diffcore_std(&revs->diffopt);
|
diffcore_std(&revs->diffopt);
|
||||||
diff_flush(&revs->diffopt);
|
diff_flush(&revs->diffopt);
|
||||||
|
Loading…
Reference in New Issue
Block a user