summaryrefslogtreecommitdiff
path: root/t/t5520-pull.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-04-23 20:34:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-04-29 20:17:52 (GMT)
commit7ad39a2784fd2d2ad6538e687404cf7f35a1e771 (patch)
treeebde8c48dd0576430cdd9aa27b47e69ee02dab45 /t/t5520-pull.sh
parent55691133291560eacaf03003528e007a3534213d (diff)
downloadgit-7ad39a2784fd2d2ad6538e687404cf7f35a1e771.zip
git-7ad39a2784fd2d2ad6538e687404cf7f35a1e771.tar.gz
git-7ad39a2784fd2d2ad6538e687404cf7f35a1e771.tar.bz2
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 <gitster@pobox.com>
Diffstat (limited to 't/t5520-pull.sh')
-rwxr-xr-xt/t5520-pull.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 5195a21..7efd45b 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -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 &&