Skip to content

Commit 450dd1d

Browse files
mehul2029gitster
authored andcommitted
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 <[email protected]> Reviewed-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1662297 commit 450dd1d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

t/t5520-pull.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,16 @@ test_expect_success 'pull.rebase' '
314314
test new = "$(git show HEAD:file2)"
315315
'
316316

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+
317327
test_expect_success 'branch.to-rebase.rebase' '
318328
git reset --hard before-rebase &&
319329
test_config branch.to-rebase.rebase true &&

0 commit comments

Comments
 (0)