summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-18 09:23:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-18 09:23:55 (GMT)
commit9aefd353804b744e05f253fb196029be620b26c0 (patch)
treea3fc63fb2803a3177958643e11b105ff3a22dcf4 /t
parenta5170794372cf1325710a3419473c91ec4af53bf (diff)
parent176f5d965ba128f79a51d6c8d1620506672403e1 (diff)
downloadgit-9aefd353804b744e05f253fb196029be620b26c0.zip
git-9aefd353804b744e05f253fb196029be620b26c0.tar.gz
git-9aefd353804b744e05f253fb196029be620b26c0.tar.bz2
Merge branch 'js/rebase-autostash-detach-fix'
"git rebase --autostash" did not correctly re-attach the HEAD at times. * js/rebase-autostash-detach-fix: built-in rebase --autostash: leave the current branch alone if possible built-in rebase: demonstrate regression with --autostash
Diffstat (limited to 't')
-rwxr-xr-xt/t3420-rebase-autostash.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index f355c68..4c7494c 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -361,4 +361,12 @@ test_expect_success 'autostash with dirty submodules' '
git rebase -i --autostash HEAD
'
+test_expect_success 'branch is left alone when possible' '
+ git checkout -b unchanged-branch &&
+ echo changed >file0 &&
+ git rebase --autostash unchanged-branch &&
+ test changed = "$(cat file0)" &&
+ test unchanged-branch = "$(git rev-parse --abbrev-ref HEAD)"
+'
+
test_done