Skip to content

Commit

Permalink
t5520: test pulling an octopus into an unborn branch
Browse files Browse the repository at this point in the history
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 <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Apr 29, 2015
1 parent 5569113 commit 7ad39a2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions t/t5520-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ test_expect_success 'pulling into void does not remove new staged files' '
)
'

test_expect_success 'pulling into void must not create an octopus' '
git init cloned-octopus &&
(
cd cloned-octopus &&
test_must_fail git pull .. master master &&
! test -f file
)
'

test_expect_success 'test . as a remote' '
git branch copy master &&
Expand Down

0 comments on commit 7ad39a2

Please sign in to comment.