Re: [PATCH] git-checkout: disable guides how to switch branches with

From: Nicolas Pitre <>
Date: 2007-02-02 08:59:46
On Thu, 1 Feb 2007, Carl Worth wrote:

> I think the problem with this is that git tells the user so little
> information, ("may lose your changes"). What changes? Is that dirty
> state?  Some commits? Hmm... have I committed anything? Why can't git
> be sure about what this operation is going to do?
> I think a really useful message would be something like:
> 	You are not on any branch so switching to branch 'foo'
> 	will cause the following commits to be lost:
> 		ba531642 A commit headline here...
> 		b1189118 Another commit headline here...
> 	Refusing to checkout 'foo'.

Please just display the last commit since this list could get long.

> If there are no commits that would become dangling, then the checkout
> should just proceed. As for the concern about losing a pointer to some
> "valuable" state that will still technically be reachable, but might
> be hard to get back, why not just print a message along the lines of:
> 	Leaving commit 7b1509f4 to checkout 'foo'.
> (or just depend on the HEAD reflog).

It is not fully available yet.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at
Received on Fri Feb 02 09:00:30 2007

This archive was generated by hypermail 2.1.8 : 2007-02-02 09:22:22 EST