OSDN Git Service

clone: test the new HEAD detection logic
authorJunio C Hamano <gitster@pobox.com>
Fri, 6 Sep 2013 15:57:53 +0000 (17:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Sep 2013 04:58:59 +0000 (21:58 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5601-clone.sh

index 0629149..ccda6df 100755 (executable)
@@ -285,4 +285,15 @@ test_expect_success NOT_MINGW,NOT_CYGWIN 'clone local path foo:bar' '
        git clone "./foo:bar" foobar
 '
 
+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