summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2007-11-14 14:04:06 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-11-14 14:04:06 -0800
commitdcb83ec18d5a79c438289eb55d9c01c61490d2e4 (patch)
tree0de2b648987d3b67426ac3b540ab9e436b0f726d /t
parentMerge branch 'rs/pretty' (diff)
parentrebase: fix "rebase --continue" breakage (diff)
downloadtgif-dcb83ec18d5a79c438289eb55d9c01c61490d2e4.tar.xz
Merge branch 'js/rebase-detached'
* js/rebase-detached: rebase: fix "rebase --continue" breakage rebase: operate on a detached HEAD
Diffstat (limited to 't')
-rwxr-xr-xt/t3402-rebase-merge.sh7
-rwxr-xr-xt/t3403-rebase-skip.sh17
2 files changed, 23 insertions, 1 deletions
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' '
diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index eab053c3e0..2ee5a00ea7 100755
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
@@ -39,6 +39,19 @@ test_expect_success 'rebase --skip with am -3' '
git reset --hard HEAD &&
git rebase --skip
'
+
+test_expect_success 'rebase moves back to skip-reference' '
+ test refs/heads/skip-reference = $(git symbolic-ref HEAD) &&
+ git branch post-rebase &&
+ git reset --hard pre-rebase &&
+ ! git rebase master &&
+ echo "hello" > hello &&
+ git add hello &&
+ git rebase --continue &&
+ test refs/heads/skip-reference = $(git symbolic-ref HEAD) &&
+ git reset --hard post-rebase
+'
+
test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'
test_expect_failure 'rebase with --merge' 'git rebase --merge master'
@@ -51,6 +64,10 @@ test_expect_success 'rebase --skip with --merge' '
test_expect_success 'merge and reference trees equal' \
'test -z "`git diff-tree skip-merge skip-reference`"'
+test_expect_success 'moved back to branch correctly' '
+ test refs/heads/skip-merge = $(git symbolic-ref HEAD)
+'
+
test_debug 'gitk --all & sleep 1'
test_done