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

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

From
Stephan Beyer <s-beyer@gmx.net>
Date
Aug 14, 2008, 20:21 UTC
Message-ID
<20080814202159.GD7138@leksak.fem-net>
In-Reply-To
<alpine.LFD.1.10.0808141258180.3324@nehalem.linux-foundation.org>
Hi,
while at the git-apply topic...
Linus Torvalds wrote:
> On Thu, 14 Aug 2008, Linus Torvalds wrote:
> >
> >   There's no way to do an all-or-nothing patch, which is often 
> >    a huge requirement.
[...]
> 
> ..or to play games with backup and reject files after-the-fact, of course.

What I missed when I first used git-apply (git-am) with some not-so- well-done patches was something like a "simulated merge" (of course, only when you ask for it), i.e. something like a user-friendly --reject behavior: Instead of generating reject files it puts conflict markers into the file. (If no context matches at all, then perhaps just insert them at the lines that the hunk header says.) And then declaring the files as "unmerged", so that you can see it in git status.

I've seen two or three people asking on #git for such a feature, so it looked like I am not the only one who misses this. But yet I've had no time to implement such a thing. Or is it even there, hidden?

Regards,
  Stephan
-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F
Previous: Linus TorvaldsNext: Jeff King
Message 9 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.