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

Re: Why doesn't git-apply remove empty file

From
FMFrancis Moreau <francis.moro@gmail.com>
Date
Aug 14, 2008, 20:17 UTC
Message-ID
<38b2ab8a0808141317i158e13fel102cdb7e880d5d7@mail.gmail.com>
In-Reply-To
<alpine.LFD.1.10.0808141246190.3324@nehalem.linux-foundation.org>

On Thu, Aug 14, 2008 at 9:57 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote:

Show 16 quoted lines
>
> The thing is, "patch" is a total piece of utterly unbelievable SH*T.
>
> git-apply acts differently, yes, but it acts differently for a damn good
> reason. No, you cannot replace git-apply with that horrible crap that is
> GNU patch.
>
> Some of the reasons are purely trivial implementation issues:
>
>  - git-apply knows about the index, and knows about updating it properly,
>   including tracking new files automatically.
>
> That's an important thing, but yeah, it's an implementation issue.
>
> The other things that git-apply do right are much more fundamental:
>
agreed with all of them...
> So no. There's no way in hell that git am should use GNU patch.
>
Just for clarification, I'm not saying to replace git-apply by patch in git-am !

But in few situations it might be better to use GNU patch for git-am. So we could have such option:

              $ git am --applier="/usr/bin/patch" ...
thanks
-- 
Francis
Previous: Linus Torvalds
Message 14 of 14 in “Why doesn't git-apply remove empty file”
  1. Francis MoreauAug 12, 2008
  2. Junio C HamanoAug 13, 2008
  3. Francis MoreauAug 13, 2008
  4. René ScharfeAug 13, 2008
  5. Linus TorvaldsAug 13, 2008
  6. Francis MoreauAug 14, 2008
  7. Linus TorvaldsAug 14, 2008
  8. Linus TorvaldsAug 14, 2008
  9. Stephan BeyerAug 14, 2008
  10. Jeff KingAug 14, 2008
  11. Stephan BeyerAug 14, 2008
  12. Jeff KingAug 15, 2008
  13. Linus TorvaldsAug 15, 2008
  14. Francis MoreauAug 14, 2008

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.