Skip to content

Commit 7ad39a2

Browse files
committed
t5520: test pulling an octopus into an unborn branch
The code comment for "git merge" in builtin/merge.c, we say If the merged head is a valid one there is no reason to forbid "git merge" into a branch yet to be born. We do the same for "git pull". and t5520 does have an existing test for that behaviour. However, there was no test to make sure that 'git pull' to pull multiple branches into an unborn branch must fail. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5569113 commit 7ad39a2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

t/t5520-pull.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ test_expect_success 'pulling into void does not remove new staged files' '
7676
)
7777
'
7878

79+
test_expect_success 'pulling into void must not create an octopus' '
80+
git init cloned-octopus &&
81+
(
82+
cd cloned-octopus &&
83+
test_must_fail git pull .. master master &&
84+
! test -f file
85+
)
86+
'
87+
7988
test_expect_success 'test . as a remote' '
8089
8190
git branch copy master &&

0 commit comments

Comments
 (0)