t5520: test --[no-]autostash with pull.rebase=true
authorMehul Jain <mehul.jain2029@gmail.com>
Sat, 2 Apr 2016 17:58:32 +0000 (23:28 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Apr 2016 18:15:02 +0000 (11:15 -0700)
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>
t/t5520-pull.sh
index 8b0c9d8988ae6897a650663b7182ba618f5174bd..739c089d500f76cbf726f0083062420a51874fc1 100755 (executable)
@@ -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 &&