summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-03-20 06:16:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-20 06:16:05 (GMT)
commit9fbcc3d2036569d501bf222e700a4c017547a267 (patch)
tree193cd5e572dcd4f8a407c88867513fe0152c2986 /t
parent1b8f4dc580432107693a780010c240c2b676ff30 (diff)
parentcbd29ead92d8555f2b918c7f9d53913f26f7a872 (diff)
downloadgit-9fbcc3d2036569d501bf222e700a4c017547a267.zip
git-9fbcc3d2036569d501bf222e700a4c017547a267.tar.gz
git-9fbcc3d2036569d501bf222e700a4c017547a267.tar.bz2
Merge branch 'js/rebase-orig-head-fix'
"git rebase" that was reimplemented in C did not set ORIG_HEAD correctly, which has been corrected. * js/rebase-orig-head-fix: built-in rebase: set ORIG_HEAD just once, before the rebase built-in rebase: demonstrate that ORIG_HEAD is not set correctly built-in rebase: use the correct reflog when switching branches built-in rebase: no need to check out `onto` twice
Diffstat (limited to 't')
-rwxr-xr-xt/t3400-rebase.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 3e73f75..460d052 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -59,6 +59,14 @@ test_expect_success 'rebase against master' '
git rebase master
'
+test_expect_success 'rebase sets ORIG_HEAD to pre-rebase state' '
+ git checkout -b orig-head topic &&
+ pre="$(git rev-parse --verify HEAD)" &&
+ git rebase master &&
+ test_cmp_rev "$pre" ORIG_HEAD &&
+ ! test_cmp_rev "$pre" HEAD
+'
+
test_expect_success 'rebase, with <onto> and <upstream> specified as :/quuxery' '
test_when_finished "git branch -D torebase" &&
git checkout -b torebase my-topic-branch^ &&