clone: test the new HEAD detection logic

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Sep 6, 2013 at 17:57 UTC 8b2772220927a67d75948dd8758a406979505623
1 file changed +11
t/t5601-clone.sh
+11
@@ -285,4 +285,15 @@ test_expect_success NOT_MINGW,NOT_CYGWIN 'clone local path foo:bar' '
285 git clone "./foo:bar" foobar
286 '
287
288 +test_expect_success 'clone from a repository with two identical branches' '
289 +
290 + (
291 + cd src &&
292 + git checkout -b another master
293 + ) &&
294 + git clone src target-11 &&
295 + test "z$( cd target-11 && git symbolic-ref HEAD )" = zrefs/heads/another
296 +
297 +'
298 +
299 test_done