diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-06-05 09:18:13 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-05 09:18:13 +0900 |
commit | 35898eafab5dfd4ebc9daf2f4e422a1d4771954b (patch) | |
tree | 78d6fc54b2b26faa195ace41e7e771a9fe445bce /t | |
parent | Merge branch 'jk/drop-free-refspecs' (diff) | |
parent | pull: ff --rebase --autostash works in dirty repo (diff) | |
download | tgif-35898eafab5dfd4ebc9daf2f4e422a1d4771954b.tar.xz |
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 && |