git-diff: fix combined diff
The code forgets that typecast binds tighter than addition, in other words: (cast *)array + i === ((cast *)array) + i Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
755b99d815
commit
75b62b489a
@ -192,7 +192,8 @@ static int builtin_diff_combined(struct rev_info *revs,
|
|||||||
parent = xmalloc(ents * sizeof(*parent));
|
parent = xmalloc(ents * sizeof(*parent));
|
||||||
/* Again, the revs are all reverse */
|
/* Again, the revs are all reverse */
|
||||||
for (i = 0; i < ents; i++)
|
for (i = 0; i < ents; i++)
|
||||||
hashcpy((unsigned char*)parent + i, ent[ents - 1 - i].item->sha1);
|
hashcpy((unsigned char *)(parent + i),
|
||||||
|
ent[ents - 1 - i].item->sha1);
|
||||||
diff_tree_combined(parent[0], parent + 1, ents - 1,
|
diff_tree_combined(parent[0], parent + 1, ents - 1,
|
||||||
revs->dense_combined_merges, revs);
|
revs->dense_combined_merges, revs);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user