diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-06-13 13:27:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-13 13:27:03 -0700 |
commit | 9e60e21e53a6a8be899f9834955017e0ff6e6906 (patch) | |
tree | 35299757de16941997a2dd7d80a1ad1db5ace825 /t | |
parent | Merge branch 'jh/close-index-before-stat' into maint (diff) | |
parent | pull: ff --rebase --autostash works in dirty repo (diff) | |
download | tgif-9e60e21e53a6a8be899f9834955017e0ff6e6906.tar.xz |
Merge branch 'tb/pull-ff-rebase-autostash' into maint
"git pull --rebase --autostash" didn't auto-stash when the local history
fast-forwards to the upstream.
* tb/pull-ff-rebase-autostash:
pull: ff --rebase --autostash works in dirty repo
Diffstat (limited to 't')
-rwxr-xr-x | t/t5520-pull.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 17f4d0fe4e..f15f7a3329 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -272,6 +272,24 @@ test_expect_success '--rebase fast forward' ' test_cmp reflog.expected reflog.fuzzy ' +test_expect_success '--rebase --autostash fast forward' ' + test_when_finished " + git reset --hard + git checkout to-rebase + git branch -D to-rebase-ff + git branch -D behind" && + git branch behind && + git checkout -b to-rebase-ff && + echo another modification >>file && + git add file && + git commit -m mod && + + git checkout behind && + echo dirty >file && + git pull --rebase --autostash . to-rebase-ff && + test "$(git rev-parse HEAD)" = "$(git rev-parse to-rebase-ff)" +' + test_expect_success '--rebase with conflicts shows advice' ' test_when_finished "git rebase --abort; git checkout -f to-rebase" && git checkout -b seq && |