summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-06-05 09:18:13 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-06-05 09:18:13 +0900
commit35898eafab5dfd4ebc9daf2f4e422a1d4771954b (patch)
tree78d6fc54b2b26faa195ace41e7e771a9fe445bce /t
parentMerge branch 'jk/drop-free-refspecs' (diff)
parentpull: ff --rebase --autostash works in dirty repo (diff)
downloadtgif-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-xt/t5520-pull.sh18
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 &&