git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Bug? Git won't apply a split hunk that went through a text editor

From
PWPhilip White <philip@mailworks.org>
Date
Aug 10, 2018, 03:17 UTC
Message-ID
<43C90F94-C9B8-49E4-A9E9-C1D652B52E2F@mailworks.org>
Hello, git enthusiasts,
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.

— Philip

Next: Jeff King
Message 1 of 3 in “Bug? Git won't apply a split hunk that went through a text editor”
  1. Philip WhiteAug 10, 2018
  2. Jeff KingAug 10, 2018
  3. Phillip WoodAug 10, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.