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

From: Jakub Narebski <[email-masked]>
Date: Fri, 11 Jul 2008 03:50:30 -0700 (PDT)

Robin Rosenberg <[email-masked]> writes:

> torsdagen den 10 juli 2008 17.31.06 skrev Mike Ralphson:

> > 
> > 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