rebase-i-p: do not include non-first-parent commits touching UPSTREAM
authorStephen Haberman <stephen@exigencecorp.com>
Wed, 15 Oct 2008 07:44:39 +0000 (02:44 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Oct 2008 16:23:54 +0000 (09:23 -0700)
commitd80d6bc146232d81f1bb4bc58e5d89263fd228d4
treee1ce75a3fc84c51c20597abf7941e2c9a1bc6c57
parentacc8559aa33b7a1ea49b0841e0759ecf05c6f26e
rebase-i-p: do not include non-first-parent commits touching UPSTREAM

This covers an odd boundary case found by Avi Kivity's script where a branch
coming off of UPSTREAM is merged into HEAD. Initially it show up in
UPSTREAM..HEAD, but technically UPSTREAM is not moving, the rest of head is, so
we should not need to rewrite the merge.

This adds a check saying we can keep `preserve=t` if `p=UPSTREAM`...unless this
is the first first-parent commit in our UPSTREAM..HEAD rev-list, which could
very well point to UPSTREAM, but we still need to consider it as rewritten so we
start pulling in the rest of the UPSTREAM..HEAD commits that point to it.

Signed-off-by: Stephen Haberman <stephen@exigencecorp.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase--interactive.sh