Skip to contentSkip to conversation

Fix t3411.3 to actually rebase something

PATCH In review Johannes Sixt 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix t3411.3 to actually rebase something

The test intends to rebase a branchy history onto a later commit, but it forgot to reset HEAD back to an earlier commit before it set up the side branches. In the end, every "rebased" commit was only a fast-forward and the 'rebase -p' did not change the commit graph at all. Insert the missing checkout that moves to an earlier commit.

---
Noticed while I was working on replacing 'git merge' by 'git cherry-pick' in the rebase -p code path.

 t/t3411-rebase-preserve-around-merges.sh | 1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/t/t3411-rebase-preserve-around-merges.sh
index ace8e54..dc81bf2 100755

t/t3411-rebase-preserve-around-merges.sh +1 -0
@@ -56,6 +56,7 @@ test_expect_success 'squash F1 into D1' '
 # And rebase G1..M1 onto E2
 
 test_expect_success 'rebase two levels of merge' '
+	git checkout A1 &&
 	test_commit G1 &&
 	test_commit H1 &&
 	test_commit I1 &&
Signature · 1 line
1.7.10.2.529.g0c18cfd
#1 lore raw
Quoted 6 lines

The test intends to rebase a branchy history onto a later commit, but it forgot to reset HEAD back to an earlier commit before it set up the side branches. In the end, every "rebased" commit was only a fast-forward and the 'rebase -p' did not change the commit graph at all. Insert the missing checkout that moves to an earlier commit.

Makes sense to me. Thanks, Johannes.

- Stephen