summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2011-06-03 01:10:10 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-06-05 17:53:01 -0700
commit3b368546a0da81aa44d8c46eb40a7e7b955cab65 (patch)
treeb37faae518eae74b0ca15497dd97ce1ca431991c /remote.c
parentMerge branch 'jk/git-connection-deadlock-fix' into maint-1.7.4 (diff)
downloadtgif-3b368546a0da81aa44d8c46eb40a7e7b955cab65.tar.xz
t: add tests for cloning remotes with detached HEAD
We didn't test this setup at all, and doing so reveals a few bugs: 1. Cloning a repository with an orphaned detached HEAD (i.e., one that points to history that is not referenced by any ref) will fail. 2. Cloning a repository with a detached HEAD that points to a tag will cause us to write a bogus "refs/tags/..." ref into the HEAD symbolic ref. We should probably detach instead. 3. Cloning a repository with a detached HEAD that points to a branch will cause us to checkout that branch. This is a known limitation of the git protocol (we have to guess at HEAD's destination, since the symref contents aren't shown to us). This test serves to document the desired behavior, which can only be achieved once the git protocol learns to share symref information. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.c')
0 files changed, 0 insertions, 0 deletions