]> git.ipfire.org Git - thirdparty/git.git/commit - revision.c
revision: ignore side parents while running simplify-merges
authorJunio C Hamano <gitster@pobox.com>
Fri, 8 Jun 2012 21:56:03 +0000 (14:56 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Jun 2012 21:04:33 +0000 (14:04 -0700)
commit6e513ba3a624a57fcf9e0f316ba54b3e0c951286
tree9812db9bfb405d2eb8373a4368c0f485d8f2cec9
parentab9d75a8d7e48e03ab0be9fc5e38902f1c173b87
revision: ignore side parents while running simplify-merges

The simplify_merges() function needs to look at all history chain to
find the closest ancestor that is relevant after the simplification,
but after --first-parent traversal, side parents haven't been marked
for relevance (they are irrelevant by definition due to the nature
of first-parent-only traversal) nor culled from the parents list of
resulting commits.

We cannot simply remove these side parents from the parents list, as
the output phase still wants to see the parents.  Instead, teach
simplify_one() and its callees to ignore the later parents.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c