git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Nicolas Pitre <nico@cam.org>
Date
Feb 1, 2007, 21:59 UTC
Message-ID
<Pine.LNX.4.64.0702011656250.3021@xanadu.home>
In-Reply-To
<87ps8ta7fx.wl%cworth@cworth.org>
On Thu, 1 Feb 2007, Carl Worth wrote:
Show 14 quoted lines
> 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.
Show 8 quoted lines
> 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.
Nicolas
Previous: Carl WorthNext: Carl Worth
Message 26 of 35 in “tone down the detached head warning”
  1. tone down the detached head warningNicolas Pitre, Jan 31, 2007
  2. Jeff KingJan 31, 2007
  3. Jakub NarebskiJan 31, 2007
  4. Jeff KingJan 31, 2007
  5. Jakub NarebskiJan 31, 2007
  6. Carl WorthJan 31, 2007
  7. Jakub NarebskiFeb 1, 2007
  8. Andy ParkinsFeb 1, 2007
  9. Matthias LederhoferFeb 1, 2007
  10. Nicolas PitreFeb 1, 2007
  11. Jeff KingFeb 1, 2007
  12. Junio C HamanoFeb 1, 2007
  13. Jeff KingFeb 1, 2007
  14. Nicolas PitreFeb 1, 2007
  15. Jeff KingFeb 1, 2007
  16. detached HEAD -- finishing touchesJunio C Hamano, Feb 1, 2007
  17. Raimund BauerFeb 1, 2007
  18. Alex RiesenFeb 1, 2007
  19. Alex RiesenFeb 1, 2007
  20. git-checkout: disable guides how to switch branches with ui.guideMatthias Lederhofer, Feb 1, 2007
  21. Junio C HamanoFeb 1, 2007
  22. Matthias LederhoferFeb 1, 2007
  23. Junio C HamanoFeb 1, 2007
  24. Matthias LederhoferFeb 1, 2007
  25. Carl WorthFeb 1, 2007
  26. Nicolas PitreFeb 1, 2007
  27. Carl WorthFeb 1, 2007
  28. Jakub NarebskiFeb 1, 2007
  29. Theodore TsoFeb 1, 2007
  30. Junio C HamanoFeb 2, 2007
  31. Theodore TsoFeb 2, 2007
  32. Carl WorthFeb 2, 2007
  33. Junio C HamanoFeb 2, 2007
  34. Carl WorthFeb 2, 2007
  35. Junio C HamanoFeb 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.