Re: Cloning empty repositories, was Re: What is the idea for bare repositories?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 12, 2007, 21:59 UTC
- Message-ID
- <7vzlxj15xe.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <4738A6BD.50704@op5.se>
Andreas Ericsson <ae@op5.se> writes:
Show 8 quoted lines
> Johannes Schindelin wrote: > >> But since you're one of the people knowing git _internals_ pretty >> well, here's another reason just for you why this cannot be done: >> There is no way to find out where the HEAD points to. > > $ mkdir foo; cd foo; git init; git symbolic-ref -q HEAD > refs/heads/master
Johannes is talking about the lack of native protocol support to transfer symref information. That's the reason git-clone dances around finding where HEAD really points at. It simply does not know -- all it gets about a symref is what SHA-1 the ref points at.