git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Tor Arvid Lund <torarvid@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 09:29:12 +0200	[thread overview]
Message-ID: <4C6B8BC8.9050301@viscovery.net> (raw)
In-Reply-To: <AANLkTineHiG9vCpbJzJ2x9CFjZ7LQeExs7cN5YhoZhft@mail.gmail.com>

Am 8/18/2010 1:27, schrieb Tor Arvid Lund:
> I often use git-gui when staging commits, and I noticed that if the
> file I'm working with has a:
> 
> \ No newline at end of file
> 
> ... as the last line of the diff, and I try to "Stage lines for
> commit", then git-gui (or really git-apply, as I understand it) says
> that I have a "corrupt patch at line <so-and-so>".
> 
> Is this a bug? Or is it maybe git-gui that sends something wrong to
> git-apply? I don't know... :-/

This is really a bug in git-gui, not in git-apply: The big while loop in
lib/diff.tcl, function apply_range_or_line, must be taught about "\ No
newline...".

-- Hannes

  parent reply	other threads:[~2010-08-18  7:29 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
2010-08-18  7:29 ` Johannes Sixt [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C6B8BC8.9050301@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=torarvid@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.
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 NNTP newsgroup(s).