git-pickaxe: simplify Octopus merges further
If more than one parents in an Octopus merge have the same origin, ignore later ones because it would not make any difference in the outcome. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
2f3f8b218a
commit
0421d9f812
@ -915,6 +915,7 @@ static void pass_blame(struct scoreboard *sb, struct origin *origin, int opt)
|
|||||||
i < MAXPARENT && parent;
|
i < MAXPARENT && parent;
|
||||||
parent = parent->next, i++) {
|
parent = parent->next, i++) {
|
||||||
struct commit *p = parent->item;
|
struct commit *p = parent->item;
|
||||||
|
int j, same;
|
||||||
|
|
||||||
if (parent_origin[i])
|
if (parent_origin[i])
|
||||||
continue;
|
continue;
|
||||||
@ -934,7 +935,16 @@ static void pass_blame(struct scoreboard *sb, struct origin *origin, int opt)
|
|||||||
origin_decref(porigin);
|
origin_decref(porigin);
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
parent_origin[i] = porigin;
|
for (j = same = 0; j < i; j++)
|
||||||
|
if (!hashcmp(parent_origin[j]->blob_sha1,
|
||||||
|
porigin->blob_sha1)) {
|
||||||
|
same = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!same)
|
||||||
|
parent_origin[i] = porigin;
|
||||||
|
else
|
||||||
|
origin_decref(porigin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user