rebase--interactive: fix parent rewriting for dropped commits
authorStephen Haberman <stephen@exigencecorp.com>
Mon, 6 Oct 2008 04:26:52 +0000 (23:26 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Oct 2008 16:20:59 +0000 (09:20 -0700)
commitfaae853ca622844cbb2982700c43ee9b2d93a2c0
tree0ec5ec3aff9b032e56713ab30de061b394e89923
parentc82efafcfa741cdddbc68379c1905953f58ef21d
rebase--interactive: fix parent rewriting for dropped commits

`rebase -i -p` got its rev-list of commits to keep by --left-right and
--cherry-pick. Adding --cherry-pick would drop commits that duplicated changes
already in the rebase target.

The dropped commits were then forgotten about when it came to rewriting the
parents of their descendents, so the descendents would get cherry-picked with
their old, unwritten parents and essentially make the rebase a no-op.

This commit adds a $DOTEST/dropped directory to remember dropped commits and
rewrite their children's parent as the dropped commit's possibly-rewritten
first-parent.

Signed-off-by: Stephen Haberman <stephen@exigencecorp.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-rebase--interactive.sh
t/t3410-rebase-preserve-dropped-merges.sh [new file with mode: 0755]