summaryrefslogtreecommitdiff
path: root/t/t5520-pull.sh
diff options
context:
space:
mode:
authorMehul Jain <mehul.jain2029@gmail.com>2016-04-02 17:58:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-04-04 18:15:02 (GMT)
commit450dd1dce1fbf6a6743e74d6aef750068fc5069c (patch)
tree0ba7224831ac29269f72255a18934c15d3653316 /t/t5520-pull.sh
parent16622979f8eaf864da5cf932d3d60de7c7d40d7d (diff)
downloadgit-450dd1dce1fbf6a6743e74d6aef750068fc5069c.zip
git-450dd1dce1fbf6a6743e74d6aef750068fc5069c.tar.gz
git-450dd1dce1fbf6a6743e74d6aef750068fc5069c.tar.bz2
t5520: test --[no-]autostash with pull.rebase=true
The "--[no-]autostash" options for git-pull are only valid in rebase mode (i.e. either --rebase is used or pull.rebase=true). Existing tests already check the cases when --rebase is used but fail to check for pull.rebase=true case. Add two new tests to check that the --[no-]autostash options work with pull.rebase=true. Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5520-pull.sh')
-rwxr-xr-xt/t5520-pull.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 8b0c9d8..739c089 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -314,6 +314,16 @@ test_expect_success 'pull.rebase' '
test new = "$(git show HEAD:file2)"
'
+test_expect_success 'pull --autostash & pull.rebase=true' '
+ test_config pull.rebase true &&
+ test_pull_autostash --autostash
+'
+
+test_expect_success 'pull --no-autostash & pull.rebase=true' '
+ test_config pull.rebase true &&
+ test_pull_autostash_fail --no-autostash
+'
+
test_expect_success 'branch.to-rebase.rebase' '
git reset --hard before-rebase &&
test_config branch.to-rebase.rebase true &&