Re: [PATCH] apply.c: tolerate diff from a dirty but unchanged path
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jun 12, 2005, 17:05 UTC
- Message-ID
- <Pine.LNX.4.58.0506121003450.2286@ppc970.osdl.org>
- In-Reply-To
- <Pine.LNX.4.58.0506120900200.2286@ppc970.osdl.org>
On Sun, 12 Jun 2005, Linus Torvalds wrote:
> > I'll fix it up,
One-liner fix checked in: we should ignore all git headers that are just a single line. A valid git header is _always_ multiple lines: either you have the "---/+++" lines of a diff, or you have the old/new lines of a mode or name change.
So the
if (git_hdr_len < 0)
test of the return value of "parse_git_header()" was changed into
if (git_hdr_len <= len)
and that cleanly solves the problem.
Linus