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

Re: possible bug in git apply?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 4, 2007, 20:00 UTC
Message-ID
<7v7iobjcjd.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0708041243070.6905@asgard.lang.hm>
david@lang.hm writes:
> since git doesn't track directories, only content (per the big
> discussion recently) I beleive that doing a checkout would leave Rob
> without the directories that he emptied out, so shouldn't git apply
> also clear the directories to end up in the same state?

It should and it does, unless you have untracked files in that directory that you haven't told git about. Then removing the directory along with these files will lose the files there, which is a wrong thing to do.

A simple "rm -fr this/directory/is/no/longer/interesting/to/me" would be all that is needed.

Previous: david@lang.hmNext: David Kastrup
Message 2 of 15 in “possible bug in git apply?”
  1. david@lang.hmAug 4, 2007
  2. Junio C HamanoAug 4, 2007
  3. David KastrupAug 4, 2007
  4. Linus TorvaldsAug 5, 2007
  5. Linus TorvaldsAug 5, 2007
  6. Junio C HamanoAug 5, 2007
  7. David KastrupAug 5, 2007
  8. Linus TorvaldsAug 5, 2007
  9. David KastrupAug 5, 2007
  10. Linus TorvaldsAug 5, 2007
  11. David KastrupAug 5, 2007
  12. Linus TorvaldsAug 5, 2007
  13. David KastrupAug 5, 2007
  14. Junio C HamanoAug 6, 2007
  15. Junio C HamanoAug 6, 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.