aboutsummaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-06-25 18:58:28 +0100
committerJunio C Hamano <gitster@pobox.com>2007-06-26 18:58:59 -0700
commit68a163c9b483ae352fcfee8c4505d113213daa73 (patch)
treea2f269413367d19626c13915811a6ff4babf97fd /t/t3404-rebase-interactive.sh
parentc54b7817f4f6bf422ea532d81217c28f63c259c5 (diff)
downloadgit-68a163c9b483ae352fcfee8c4505d113213daa73.tar.gz
git-68a163c9b483ae352fcfee8c4505d113213daa73.tar.xz
rebase -i: provide reasonable reflog for the rebased branch
If your rebase succeeded, the HEAD's reflog will still show the whole mess, but "<branchname>@{1}" now shows the state _before_ the rebase, so that you can reset (or compare) the original and the rebased revisions more easily. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 19a3a8e81..9f12bb932 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -99,6 +99,10 @@ test_expect_success 'rebase on top of a non-conflicting commit' '
test $(git rev-parse I) = $(git rev-parse HEAD~2)
'
+test_expect_success 'reflog for the branch shows state before rebase' '
+ test $(git rev-parse branch1@{1}) = $(git rev-parse original-branch1)
+'
+
test_expect_success 'exchange two commits' '
FAKE_LINES="2 1" git rebase -i HEAD~2 &&
test H = $(git cat-file commit HEAD^ | tail -n 1) &&