summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-02-12 06:42:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-02-13 06:37:35 (GMT)
commit5cd12b85fe8ff74f202a158511ead34e8aba584c (patch)
treec77b7ebd854dc584810b85126c1c7e7fe6031172 /t
parent1a526d483865d85aca3a10c650e85c44ad1f001b (diff)
downloadgit-5cd12b85fe8ff74f202a158511ead34e8aba584c.zip
git-5cd12b85fe8ff74f202a158511ead34e8aba584c.tar.gz
git-5cd12b85fe8ff74f202a158511ead34e8aba584c.tar.bz2
Install the default "master" branch configuration after cloning a void
After "cloning from an empty repository", we have a configuration to describe the remote's URL and the default ref mappings, but we lack the branch configuration for the default branch we create on our end, "master". It is likely that the empty repository we cloned from will point the default "master" branch with its HEAD, so prepare the local configuration to match. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t5601-clone.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index fe287d3..44793f2 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -144,4 +144,19 @@ test_expect_success 'clone to an existing path' '
test_must_fail git clone src target-5
'
+test_expect_success 'clone a void' '
+ mkdir src-0 &&
+ (
+ cd src-0 && git init
+ ) &&
+ git clone src-0 target-6 &&
+ (
+ cd src-0 && test_commit A
+ ) &&
+ git clone src-0 target-7 &&
+ # There is no reason to insist they are bit-for-bit
+ # identical, but this test should suffice for now.
+ test_cmp target-6/.git/config target-7/.git/config
+'
+
test_done