Re: [PATCH] tone down the detached head warning
- From
Nicolas Pitre <nico@cam.org>
- Date
- Feb 1, 2007, 00:11 UTC
- Message-ID
- <Pine.LNX.4.64.0701311907500.3021@xanadu.home>
- In-Reply-To
- <20070131231942.GB31145@coredump.intra.peff.net>
On Wed, 31 Jan 2007, Jeff King wrote:
Show 10 quoted lines
> On Wed, Jan 31, 2007 at 02:10:37PM -0500, Nicolas Pitre wrote: > > > This is not meant to frighten people or even to suggest they might be > > doing something wrong, but rather to notify them of a state change and > > provide a likely option in the case this state was entered by mistake. > > I like this much better. Though I wonder in Carl's case if we can do > even better, since the user is checking out a tracking branch. Does it > really make sense to say "you are not on ANY branch"? Maybe instead: >
[...]
> + case "$detached_remote" in > + "") detach_warn="Note: you are not on ANY branch anymore." ;; > + *) detach_warn="Note: you are on the remote tracking branch '$detached_remote'" ;; > + esac
No. This is misleading.
You are _not_ on the remote tracking branch. You just happen to have checked out a commit that came from a tracking branch, but you are still detached from any branch at that point.
Nicolas