From: Tor Arvid Lund <torarvid@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: BUG?: git-apply sometimes says "corrupt patch" when adding single lines
Date: Wed, 18 Aug 2010 03:37:34 +0200 [thread overview]
Message-ID: <AANLkTi=mJdufWiKDQBSA6EVpb6Qj3GfGPKZL4pJGdKYu@mail.gmail.com> (raw)
In-Reply-To: <20100817234314.GK2221@burratino>
On Wed, Aug 18, 2010 at 1:43 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Tor Arvid Lund wrote:
>
>> I don't really know the git-gui code or the git C code well, but it
>> seems that I got around the error with this small patch:
>>
>> diff --git a/builtin/apply.c b/builtin/apply.c
>> index 12ef9ea..124791f 100644
>> --- a/builtin/apply.c
>> +++ b/builtin/apply.c
>> @@ -1335,6 +1335,8 @@ static int parse_fragment(char *line, unsigned long size,
>> * l10n of "\ No newline..." is at least that long.
>> */
>> case '\\':
>> + if (newlines == oldlines == 1)
> [...]
>
> Heh. This code is a roundabout way to say "if (newlines == oldlines)",
> rather than "if (newlines == 1 && oldlines == 1)" that might have been
> intended.
Right you are, good sir ;-)
> Unfortunately I do not have any more insight than that. If you can
> give an example reproducing this with git apply from the command
> line, that would be very helpful.
I'll try to do that tomorrow.. My brain needs sleep before it will function :)
-Tor Arvid-
next prev parent reply other threads:[~2010-08-18 1:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 23:27 BUG?: git-apply sometimes says "corrupt patch" when adding single lines Tor Arvid Lund
2010-08-17 23:43 ` Jonathan Nieder
2010-08-18 1:37 ` Tor Arvid Lund [this message]
2010-08-18 7:29 ` Johannes Sixt
2010-08-18 9:15 ` Tor Arvid Lund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=mJdufWiKDQBSA6EVpb6Qj3GfGPKZL4pJGdKYu@mail.gmail.com' \
--to=torarvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).