Re: [PATCH v2 1/2] Allow git-apply to ignore the hunk headers
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 6, 2008, 14:04 UTC
- Message-ID
- <alpine.DEB.1.00.0806061502030.1783@racer>
- In-Reply-To
- <4848E105.7050405@gnu.org>
Hi,
On Fri, 6 Jun 2008, Paolo Bonzini wrote:
Show 7 quoted lines
> > @@ -0,0 +0,0 @@ > > default: > > - return -1; > > + return len != 4 && memcmp(line - len, "-- \n", len); > > } > > You're never returning -1 here, right?
You are a clever guy! I really do not return -1 here. But then, the return value is only checked for non-zeroness. As is obvious from the part you did not quote.
Show 5 quoted lines
> > However, this will not work if anybody has a signature starting with > > "@@ ", "+", " ", "-" or "diff "... > > I think that the main worry is the patches made with git-format-patch, > and those are not problematic.
Actually, this change was done in v3 on _explicit_ request from Junio who wants to be able to use the patch for git-am, where we cannot rely on format-patch.
So yes, they _are_ problematic.
Thanks, Dscho