Re: [PATCH] tone down the detached head warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 31, 2007 at 10:47:31PM -0500, Nicolas Pitre wrote:

> But this language convey the truth and users will have to get used to it 
> at some point. We should not hide the fact that HEAD is really detached at
> that point, otherwise it could be presumed that a commit might update the
> checked out (tracking) branch which is obviously not the case.

OK, so let's not lie about it, then. But that doesn't mean we can't
explain further. What about:

$ git checkout origin/pu
Detached your HEAD (based on remote origin/pu) -- you are not on any branch
...

Except that I think the line is getting a bit long. But the point is to
explain _why_ we're detached (you could even put a different note for
tags). If a user already knows that 'git checkout v1.4.4.4' is going to
put him in a detached state, then he doesn't really care about the
message one way or the other. But if he doesn't know (and there is no
clue on the command line, except for the fact that we already know
v1.4.4.4 is a tag and origin/pu is a remote tracking branch), then it
might make it more why it happened.

-Peff
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]