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

But in `git checkout --patch`

From
BQBenjamin Quorning <bquorning@zendesk.com>
Date
Dec 15, 2014, 14:41 UTC
Message-ID
<CAN9HoQH5=z-d=J1HCA2UwGuFek21X6qCd_jFEkNpE6GiE50oNg@mail.gmail.com>

I'm not entirely sure how you like your bug reports, so I'll just the best I can :-)

$ git --version git version 2.2.0

$ uname -a Darwin buzz.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64

Reproduction steps:
1. A repository with a changed file, but no staged changes.
2. Execute `git checkout --patch`
3. When asked, press `e` to edit a chunk (opens an external editor in my case)
4. With the editor still open, click ctrl-C in the terminal.
5. The diff that was being edited, and the command prompt ("discard
this hunk from worktree" etc) is printed to the screen, over and over
again.
6. I have to grep and kill this process: /usr/bin/perl
/usr/local/Cellar/git/2.2.0/libexec/git-core/git-add--interactive
--patch=checkout --

-- Benjamin Quorning

Next: Jeff King
Message 1 of 3 in “But in `git checkout --patch`”
  1. Benjamin QuorningDec 15, 2014
  2. add--interactive: leave main loop on read errorJeff King, Dec 15, 2014
  3. Junio C HamanoDec 15, 2014

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.