Re: git clone (ssh://) skips detached HEAD
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 1, 2011, 22:22 UTC
- Message-ID
- <7vipspfazy.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20110601220518.GA32681@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> We basically have two choices: > > 1. Fetch objects for HEAD on clone. > > 2. Don't checkout a detached HEAD if we don't have the object (or > possibly, don't checkout a detached HEAD at all; we already do > something similar for the case of a HEAD that points to a bogus > branch). > > I think (2) is more consistent with the refspec we set up, but (1) is > probably more convenient to users (and better matches the case where the > remote is on a detached HEAD that _does_ point to something we have).
Probably. As HEAD is usually visible via ls-remote exchange, the usual security concern would not come into the picture even if we do (1), even though it feels somewhat wrong to do.