git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Philip White <philip@mailworks.org>
Cc: Phillip Wood <phillip.wood@talktalk.net>, git@vger.kernel.org
Subject: Re: Bug? Git won't apply a split hunk that went through a text editor
Date: Fri, 10 Aug 2018 14:27:45 -0400	[thread overview]
Message-ID: <20180810182745.GA8876@sigill.intra.peff.net> (raw)
In-Reply-To: <43C90F94-C9B8-49E4-A9E9-C1D652B52E2F@mailworks.org>

On Thu, Aug 09, 2018 at 08:17:36PM -0700, Philip White wrote:

> I’d like to report what I suspect is a bug in Git, tested in 2.18 and
> 2.14. (I’d be delighted to be corrected if it is my own
> misunderstanding.) I’m reporting it here based on guidance from
> https://git-scm.com/community.
> 
> I created a minimal testcase with a detailed README here:
> https://github.com/philipmw/git-bugreport-2018-hunk-fail
> 
> Overview of the bug:
> 
> When interactively selecting hunks to apply, using `git checkout -p
> <tree> <file>`, git will correctly apply an unmodified hunk, but will
> refuse to apply a hunk that went through a text editor ("e" command),
> even when I made no changes in the text editor.
> 
> Thanks for any advice or attention you can give to this matter.

This sounds like the bug discussed in:

  https://public-inbox.org/git/be321106-2f10-e678-8237-449d2dd30fee@talktalk.net/

(that message and the surrounding thread).

The fix is in f4d35a6b49 (add -p: fix counting empty context lines in
edited patches, 2018-06-11), which is in the current tip of 'master',
but not yet any released version.

-Peff

  reply	other threads:[~2018-08-10 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-10  3:17 Bug? Git won't apply a split hunk that went through a text editor Philip White
2018-08-10 18:27 ` Jeff King [this message]
2018-08-10 19:14   ` Phillip Wood

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=20180810182745.GA8876@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=philip@mailworks.org \
    --cc=phillip.wood@talktalk.net \
    /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).