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

Re: [PATCH] checkout -f: do not leave untracked working tree files.

From
Junio C Hamano <junkio@cox.net>
Date
Jun 20, 2006, 11:18 UTC
Message-ID
<7vfyi09isf.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<8764iw5bvl.fsf@gmail.com>
Santi Béjar <sbejar@gmail.com> writes:
> Another thing to take into account is that, for this particular
> case/sequence, the untracked file-F is exactly the same as the one from
> the pull, so you are not overwritting that file and it could succeed.

Yes and no. The untracked file is not even known to git when pull is happening (that is the definition of "untracked"). Yes, we could see if the contents happen to match and choose to overwrite, but I think it is often more likely that the contents do not match that it is not worth it (I have not examined what it would involve to add that check yet, so it might turn out to be a cheap check but I doubt it).

Previous: Santi BéjarNext: Alexander Litvinov
Message 13 of 17 in “git 1.4.0 usability problem”
  1. Jeff GarzikJun 18, 2006
  2. Ryan AndersonJun 18, 2006
  3. Ryan AndersonJun 18, 2006
  4. Junio C HamanoJun 18, 2006
  5. Junio C HamanoJun 18, 2006
  6. Jeff GarzikJun 18, 2006
  7. Junio C HamanoJun 19, 2006
  8. Jeff GarzikJun 20, 2006
  9. Ryan AndersonJun 20, 2006
  10. Junio C HamanoJun 20, 2006
  11. checkout -f: do not leave untracked working tree files.Junio C Hamano, Jun 20, 2006
  12. Santi BéjarJun 20, 2006
  13. Junio C HamanoJun 20, 2006
  14. Alexander LitvinovJun 20, 2006
  15. Junio C HamanoJun 20, 2006
  16. Alexander LitvinovJun 20, 2006
  17. Carl WorthJun 20, 2006

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.