From 6fd2f5e60d4d574ff9e5dd8ce1e229328c785d69 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 8 Nov 2007 18:19:08 +0000 Subject: rebase: operate on a detached HEAD The interactive version of rebase does all the operations on a detached HEAD, so that after a successful rebase, @{1} is the pre-rebase state. The reflogs of "HEAD" still show all the actions in detail. This teaches the non-interactive version to do the same. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t3402-rebase-merge.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 't/t3402-rebase-merge.sh') diff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh index 0779aaa9ab..7b7d07269a 100755 --- a/t/t3402-rebase-merge.sh +++ b/t/t3402-rebase-merge.sh @@ -48,9 +48,14 @@ test_expect_success 'reference merge' ' git merge -s recursive "reference merge" HEAD master ' +PRE_REBASE=$(git rev-parse test-rebase) test_expect_success rebase ' git checkout test-rebase && - git rebase --merge master + GIT_TRACE=1 git rebase --merge master +' + +test_expect_success 'test-rebase@{1} is pre rebase' ' + test $PRE_REBASE = $(git rev-parse test-rebase@{1}) ' test_expect_success 'merge and rebase should match' ' -- cgit v1.2.3