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

Re: possible bug in git apply?

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Aug 5, 2007, 19:20 UTC
Message-ID
<alpine.LFD.0.999.0708051219440.5037@woody.linux-foundation.org>
In-Reply-To
<853ayxiznp.fsf@lola.goethe.zz>
On Sun, 5 Aug 2007, David Kastrup wrote:
> 
> But your proposed three passes won't work with a patch removing
> "x/..."  and creating "x" in its place, since "x/" gets only removed
> in pass 3, and "x" needs to created in pass 2 already.

Yes, I was wrong. The current two passes are the right thing to do, and we should just always remove empty directories (and my patch was fine: we can leave them alone if it's a pure "modify file in place", but that's really the only case).

		Linus
Previous: David KastrupNext: David Kastrup
Message 12 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.