Re: [PATCH v2 6/6] clone: print advice on checking out detached HEAD
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 10, 2012, 04:49 UTC
- Message-ID
- <7vlipgb1r1.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CACsJy8CuYkzFVrEG6T2HUAwJGnjit2xWt3VSN-9USt7h+B_CBw@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
Show 8 quoted lines
> 2012/1/10 Junio C Hamano <gitster@pobox.com>: >> This patch makes 100% sense _if_ we let clone result in a repository with >> a detached HEAD, which I am not sure if it is a good idea, or if it is >> better to fail the attempt to clone to give incentive to the owner of the >> remote repository to fix it. > > Then a hostile remote can stop users from cloning his repository by > detaching HEAD? That's not nice.
That's crazy talk. Why does anybody from a hostile remote to begin with?
> On the other hand, if specifying --branch=<wrong-branch> leads to > detached case, then we should probably refuse to clone.
If you mean "nonexistent" by "wrong", yeah, I agree, as we do not know what the user asked us to pull down in that case.