diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-06-05 03:18:13 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-05 03:18:13 +0300 |
commit | 35898eafab5dfd4ebc9daf2f4e422a1d4771954b (patch) | |
tree | 78d6fc54b2b26faa195ace41e7e771a9fe445bce /t | |
parent | 6e9b0108c6515510580da1698af893263f8cd7de (diff) | |
parent | f15e7cf5cc95cbfd0d05c260f75631781e290edc (diff) |
Merge branch 'tb/pull-ff-rebase-autostash'
"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 && |