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

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

From
Jeff King <peff@peff.net>
Date
Aug 15, 2008, 04:08 UTC
Message-ID
<20080815040834.GA3732@sigill.intra.peff.net>
In-Reply-To
<20080814211034.GE7138@leksak.fem-net>
On Thu, Aug 14, 2008 at 11:10:34PM +0200, Stephan Beyer wrote:
> git am -3 looks for the base blob in the "index" line of the patch.
> 
> Now imagine you do not have this blob in git, e.g. because you've not
> fetched some large side branch from another repo.

Ah, you're right. That is much trickier (though it can still be used in some cases, depending on how broken the patch is).

> Then git am -3 won't help, too. (Yes, in this example fetching the
> branch may help, but there may be other examples.)

An easy example that breaks: the patch submitter didn't use git at all, so there is no branch to fetch from. :)

-Peff
Previous: Stephan BeyerNext: Linus Torvalds
Message 12 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.