author | Stephen Haberman <stephen@exigencecorp.com> | |
Mon, 6 Oct 2008 04:26:52 +0000 (23:26 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 16 Oct 2008 16:20:59 +0000 (09:20 -0700) | ||
commit | faae853ca622844cbb2982700c43ee9b2d93a2c0 | |
tree | 0ec5ec3aff9b032e56713ab30de061b394e89923 | tree | snapshot |
parent | c82efafcfa741cdddbc68379c1905953f58ef21d | commit | diff |
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>
`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 | diff | blob | history | |
t/t3410-rebase-preserve-dropped-merges.sh | [new file with mode: 0755] | blob |