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

Re: [PATCH] git-gui: give more advice when detaching HEAD

From
Jeff King <peff@peff.net>
Date
Feb 16, 2011, 03:50 UTC
Message-ID
<20110216035032.GB2414@sigill.intra.peff.net>
In-Reply-To
<87pqqtaxke.fsf@fox.patthoyts.tk>
On Tue, Feb 15, 2011 at 07:48:33PM +0000, Pat Thoyts wrote:
Show 5 quoted lines
> My feeling is that the user should be making a branch to hold his
> commits. So I suggest adding some text to suggest that a branch be
> created and keep annoying the user every time they commit to a detached
> head. This errs on the side of not dropping commits into the reflog
> which seems the most useful strategy to me.

I like Heiko's suggestion of a check-box to turn off gui.warndetachedcommit, though I personally don't care much as a non-gui user. I also think if you are going to suggest making a branch that there should be an "OK, make the branch now" button, or at least a button to take you to the right dialog to create it. But again, I know nothing about gui design and as a non-user I don't have a strong feeling.

But...
Show 6 quoted lines
> +	if {$is_detached && $repo_config(gui.warndetachedcommit)} {
> +		set msg [mc "You are about to commit on a detached head.\
> +This is a potentially dangerous thing to do because if you switch\
> +to another branch you will loose your changes and it can be difficult\
> +to retrieve them later from the reflog. You should probably cancel this\
> +commit and create a new branch to continue.\n\

I do have a strong feeling about English grammar, and this should be s/loose/lose/. :)

-Peff
Previous: Pat ThoytsNext: Heiko Voigt
Message 15 of 19 in “git-gui: give more advice when detaching HEAD”
  1. git-gui: give more advice when detaching HEADJeff King, Feb 12, 2011
  2. Junio C HamanoFeb 12, 2011
  3. Jeff KingFeb 12, 2011
  4. Junio C HamanoFeb 12, 2011
  5. Jeff KingFeb 12, 2011
  6. Junio C HamanoFeb 17, 2011
  7. Junio C HamanoFeb 12, 2011
  8. Sverre RabbelierFeb 13, 2011
  9. Johannes SixtFeb 13, 2011
  10. Junio C HamanoFeb 13, 2011
  11. Heiko VoigtFeb 13, 2011
  12. Jeff KingFeb 15, 2011
  13. Heiko VoigtFeb 15, 2011
  14. Pat ThoytsFeb 15, 2011
  15. Jeff KingFeb 16, 2011
  16. Heiko VoigtFeb 17, 2011
  17. Jeff KingFeb 16, 2011
  18. Heiko VoigtFeb 17, 2011
  19. Victor EngmarkFeb 16, 2011

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.