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>

Mehul Jain committed Apr 2, 2016 at 23:28 UTC 450dd1dce1fbf6a6743e74d6aef750068fc5069c
1 file changed +10
t/t5520-pull.sh
+10
@@ -314,6 +314,16 @@ test_expect_success 'pull.rebase' '
314 test new = "$(git show HEAD:file2)"
315 '
316
317 +test_expect_success 'pull --autostash & pull.rebase=true' '
318 + test_config pull.rebase true &&
319 + test_pull_autostash --autostash
320 +'
321 +
322 +test_expect_success 'pull --no-autostash & pull.rebase=true' '
323 + test_config pull.rebase true &&
324 + test_pull_autostash_fail --no-autostash
325 +'
326 +
327 test_expect_success 'branch.to-rebase.rebase' '
328 git reset --hard before-rebase &&
329 test_config branch.to-rebase.rebase true &&