summaryrefslogtreecommitdiff
path: root/t/t5601-clone.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-10-30 19:10:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-10-30 19:10:06 (GMT)
commit9907d1359ccb1e670a408e5ab91d2b6048bd997b (patch)
tree34b940ad8c553384f7748710a75de9f24dedf8fa /t/t5601-clone.sh
parent177f0a400955f2345c73a5c8b0459d617429ffd9 (diff)
parent360a3261a471ee59760b0743bbb27d3a60849ae2 (diff)
downloadgit-9907d1359ccb1e670a408e5ab91d2b6048bd997b.zip
git-9907d1359ccb1e670a408e5ab91d2b6048bd997b.tar.gz
git-9907d1359ccb1e670a408e5ab91d2b6048bd997b.tar.bz2
Merge branch 'jc/upload-pack-send-symref'
One long-standing flaw in the pack transfer protocol used by "git clone" was that there was no way to tell the other end which branch "HEAD" points at, and the receiving end needed to guess. A new capability has been defined in the pack protocol to convey this information so that cloning from a repository with more than one branches pointing at the same commit where the HEAD is at now reliably sets the initial branch in the resulting repository. * jc/upload-pack-send-symref: t5570: Update for clone-progress-to-stderr branch t5570: Update for symref capability clone: test the new HEAD detection logic connect: annotate refs with their symref information in get_remote_head() connect.c: make parse_feature_value() static upload-pack: send non-HEAD symbolic refs upload-pack: send symbolic ref information as capability upload-pack.c: do not pass confusing cb_data to mark_our_ref() t5505: fix "set-head --auto with ambiguous HEAD" test
Diffstat (limited to 't/t5601-clone.sh')
-rwxr-xr-xt/t5601-clone.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 8f3cd44..1d1c875 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -329,4 +329,15 @@ test_expect_success 'bracketed hostnames are still ssh' '
expect_ssh myhost:123 src
'
+test_expect_success 'clone from a repository with two identical branches' '
+
+ (
+ cd src &&
+ git checkout -b another master
+ ) &&
+ git clone src target-11 &&
+ test "z$( cd target-11 && git symbolic-ref HEAD )" = zrefs/heads/another
+
+'
+
test_done