t3404: Add test case for aborted --continue after "edit"
Add a test case for the bugfix introduced by commit 8beb1f33d
"git-rebase-interactive: do not squash commits on abort".
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
			
			
This commit is contained in:
		 Stephan Beyer
					Stephan Beyer
				
			
				
					committed by
					
						 Junio C Hamano
						Junio C Hamano
					
				
			
			
				
	
			
			
			 Junio C Hamano
						Junio C Hamano
					
				
			
						parent
						
							944019c8b3
						
					
				
				
					commit
					dc7f55cbe9
				
			| @ -373,6 +373,21 @@ test_expect_success '--continue tries to commit, even for "edit"' ' | ||||
| 	test $parent = $(git rev-parse HEAD^) | ||||
| ' | ||||
|  | ||||
| test_expect_success 'aborted --continue does not squash commits after "edit"' ' | ||||
| 	old=$(git rev-parse HEAD) && | ||||
| 	test_tick && | ||||
| 	FAKE_LINES="edit 1" git rebase -i HEAD^ && | ||||
| 	echo "edited again" > file7 && | ||||
| 	git add file7 && | ||||
| 	( | ||||
| 		FAKE_COMMIT_MESSAGE=" " && | ||||
| 		export FAKE_COMMIT_MESSAGE && | ||||
| 		test_must_fail git rebase --continue | ||||
| 	) && | ||||
| 	test $old = $(git rev-parse HEAD) && | ||||
| 	git rebase --abort | ||||
| ' | ||||
|  | ||||
| test_expect_success 'rebase a detached HEAD' ' | ||||
| 	grandparent=$(git rev-parse HEAD~2) && | ||||
| 	git checkout $(git rev-parse HEAD) && | ||||
|  | ||||
		Reference in New Issue
	
	Block a user