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