Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-09-25 19:43:15 +0400
committerJunio C Hamano <gitster@pobox.com>2007-09-26 11:42:17 +0400
commit73697a0b572f7f216d8355d83bf69e9b42e9a077 (patch)
treeaa9eb581690eff932c80dcd0be14088dbeca454a /t
parent61ab92df40b2c256299ad3d812ee0de14353098d (diff)
rebase -i: work on a detached HEAD
Earlier, rebase -i refused to rebase a detached HEAD. Now it no longer does. Incidentally, this fixes "git gc --auto" shadowing the true exit status. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t3404-rebase-interactive.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 1af73a47c6..f2214dd0fa 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -309,4 +309,12 @@ test_expect_success '--continue tries to commit, even for "edit"' '
test $parent = $(git rev-parse HEAD^)
'
+test_expect_success 'rebase a detached HEAD' '
+ grandparent=$(git rev-parse HEAD~2) &&
+ git checkout $(git rev-parse HEAD) &&
+ test_tick &&
+ FAKE_LINES="2 1" git rebase -i HEAD~2 &&
+ test $grandparent = $(git rev-parse HEAD~2)
+'
+
test_done