diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-03-20 09:16:05 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-03-20 09:16:05 +0300 |
commit | 9fbcc3d2036569d501bf222e700a4c017547a267 (patch) | |
tree | 193cd5e572dcd4f8a407c88867513fe0152c2986 /t | |
parent | 1b8f4dc580432107693a780010c240c2b676ff30 (diff) | |
parent | cbd29ead92d8555f2b918c7f9d53913f26f7a872 (diff) |
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-x | t/t3400-rebase.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index 3e73f7584c..460d0523be 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^ && |