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

Differences between git-applu and GNU patch (was: [JGIT PATCH 1/1] jgit: create a tag command)

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 11, 2008, 10:50 UTC
Message-ID
<m38ww8elu8.fsf_-_@localhost.localdomain>
In-Reply-To
<200807102002.11044.robin.rosenberg.lists@dewire.com>
Robin Rosenberg <robin.rosenberg.lists@dewire.com> writes:
> torsdagen den 10 juli 2008 17.31.06 skrev Mike Ralphson:
Show 5 quoted lines
> > 
> > Apologies this will be whitespace damaged, but it's trivial.
>
> Don't do like that again : Had to use patch -l to apply this.
> Why doesn't git am have that?

It is not git-am that should have implemented -l / --ignore-whitespace option, but git-apply... well, beside passing it to git-apply of course.

I tried to look up how git-apply is implemented (builtin-apply.c), but it looks like it implements patching itself, and I am not familiar at all with this code... BTW. why applying patch is not left to xdiff code?

It would be nice if git-apply implemented larger subset of GNU patch options, for example --dry-run (which is similar but I think not exactly the same as --check), --fuzz=<num> (how it differs from -C<n>?) --strip=<num> as equivalent to -p<n>, -l / --ignore-whitespace, --reject-file=<rejectfile> together with --reject...

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Robin RosenbergNext: Shawn O. Pearce
Message 5 of 13 in “jgit: create a tag command”
  1. 1/1 jgit: create a tag commandRobin Rosenberg, Jul 6, 2008
  2. Robin RosenbergJul 6, 2008
  3. Mike RalphsonJul 10, 2008
  4. Robin RosenbergJul 10, 2008
  5. Differences between git-applu and GNU patch (was: [JGIT PATCH 1/1] jgit: create a tag command)Jakub Narebski, Jul 11, 2008
  6. Shawn O. PearceJul 11, 2008
  7. Robin RosenbergJul 11, 2008
  8. Mike RalphsonJul 11, 2008
  9. Shawn O. PearceJul 12, 2008
  10. Shawn O. PearceJul 12, 2008
  11. Robin RosenbergJul 17, 2008
  12. Shawn O. PearceJul 17, 2008
  13. Robin RosenbergJul 17, 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.