summaryrefslogtreecommitdiff
path: root/t/t5520-pull.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-06-13 20:27:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-13 20:27:03 (GMT)
commit9e60e21e53a6a8be899f9834955017e0ff6e6906 (patch)
tree35299757de16941997a2dd7d80a1ad1db5ace825 /t/t5520-pull.sh
parentf24e079cb6ecaa217e593c2d2620187044ba1b0d (diff)
parentf15e7cf5cc95cbfd0d05c260f75631781e290edc (diff)
downloadgit-9e60e21e53a6a8be899f9834955017e0ff6e6906.zip
git-9e60e21e53a6a8be899f9834955017e0ff6e6906.tar.gz
git-9e60e21e53a6a8be899f9834955017e0ff6e6906.tar.bz2
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/t5520-pull.sh')
-rwxr-xr-xt/t5520-pull.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 17f4d0f..f15f7a3 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 &&