Subject: Re: git clone (ssh://) skips detached HEAD

From: Junio C Hamano <[email-masked]>
Date: Wed, 01 Jun 2011 15:22:09 -0700

Jeff King <[email-masked]> writes:

> 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.