Skip to content

Commit 8b27722

Browse files
committed
clone: test the new HEAD detection logic
Signed-off-by: Junio C Hamano <[email protected]>
1 parent a45b5f0 commit 8b27722

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

t/t5601-clone.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,4 +285,15 @@ test_expect_success NOT_MINGW,NOT_CYGWIN 'clone local path foo:bar' '
285285
git clone "./foo:bar" foobar
286286
'
287287

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+
288299
test_done

0 commit comments

Comments
 (0)