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

Re: Help understanding git checkout behavior

From
Jeff King <peff@peff.net>
Date
Jun 11, 2012, 21:58 UTC
Message-ID
<20120611215808.GA6832@sigill.intra.peff.net>
In-Reply-To
<20120611214705.GC32061@sigill.intra.peff.net>
On Mon, Jun 11, 2012 at 05:47:05PM -0400, Jeff King wrote:
Show 7 quoted lines
> > I just checked the history of unpack-trees code (which is the
> > underlying machinery of read-tree, which in turn is the machinery
> > used to check out another branch by "git checkout"), and I suspect
> > that this particular case has never worked.
> 
> Yeah, I verified it back to v1.6.x, but didn't bother going further
> back.

Actually, it was broken by c819353 (Fix switching to a branch with D/F when current branch has file D., 2007-03-15).

However, before that the check was too tight, and says:
  fatal: Untracked working tree file 'something' would be removed by merge.
which is not really correct, either.
-Peff
Previous: Jeff KingNext: Junio C Hamano
Message 11 of 13 in “Help understanding git checkout behavior”
  1. Cláudio LourençoJun 11, 2012
  2. Konstantin KhomoutovJun 11, 2012
  3. konglu@minatec.inpg.frJun 11, 2012
  4. LeilaJun 11, 2012
  5. Jeff KingJun 11, 2012
  6. Junio C HamanoJun 11, 2012
  7. Cláudio LourençoJun 11, 2012
  8. Junio C HamanoJun 11, 2012
  9. Junio C HamanoJun 11, 2012
  10. Jeff KingJun 11, 2012
  11. Jeff KingJun 11, 2012
  12. Junio C HamanoJun 11, 2012
  13. Vincent van RavesteijnJun 11, 2012

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.