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

Re: [PATCH] checkout: indicate when a detached head is checked out for a branch

From
Duy Nguyen <pclouds@gmail.com>
Date
Jul 18, 2014, 10:58 UTC
Message-ID
<CACsJy8CG17tzWWO27Pv2c+CjDyYiYATzgBSFfMBaugYgQfZQ5g@mail.gmail.com>
In-Reply-To
<35dbe7e3f3e4566d775bea19d816adc44db8ed5c.1405676303.git.git@drmicha.warpmail.net>

On Fri, Jul 18, 2014 at 4:50 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

Show 6 quoted lines
> I really like the new --to feature and will convert all my "new workdir"
> checkouts to that. But that detached checkout is so easy to miss - in fact
> I noticed it only when I compared "new-workdir" to "checkout --to" for a
> test repo with one branch, to see what a converter would need to do.
>
> I'm even wondering whether we should do this DWIMmery at all,

This is what this series needs, user's opinions (bad or good). The other option is abort the checkout immediately. I think I made detach behavior default is because it's more work (and needs to be proven feasible). How about a config key that lets user decide what to do here, abort or detach. We may change the default behavior too if people think the current one is not good.

> given how "dangerous" a detached head is for those who are not aware of it
> before gc kicks in.

Wait, what danger are we talking about? I thought gc pays attention to detached heads as well..

-- 
Duy
Previous: Michael J GruberNext: Michael J Gruber
Message 2 of 8 in “checkout: indicate when a detached head is checked out for a branch”
  1. checkout: indicate when a detached head is checked out for a branchMichael J Gruber, Jul 18, 2014
  2. Duy NguyenJul 18, 2014
  3. Michael J GruberJul 18, 2014
  4. Max KirillovJul 18, 2014
  5. Junio C HamanoJul 18, 2014
  6. Dennis KaarsemakerJul 18, 2014
  7. Junio C HamanoJul 18, 2014
  8. Michael J GruberJul 21, 2014

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.