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

Re: Question about behaviour of git-checkout --patch option

From
Jeff King <peff@peff.net>
Date
May 27, 2020, 08:00 UTC
Message-ID
<20200527080009.GB4006373@coredump.intra.peff.net>
In-Reply-To
<20200527075648.GA4006373@coredump.intra.peff.net>
On Wed, May 27, 2020 at 03:56:48AM -0400, Jeff King wrote:
Show 5 quoted lines
> which does do the right thing. But:
> 
>   - all of this is in the process of being rewritten in C, so it should
>     probably go into add-interactive.c (it's not yet the default to use
>     the C version, but it probably will be soon).
Trying your case with:
  git -c add.interactive.usebuiltin=true checkout -p master .

shows that it does not list the added file at all. I suspect the form of the fix will be similar, but it may have to plumb through the file addition from the diff layer, as well.

-Peff
Previous: Jeff KingNext: Merlin Büge
Message 3 of 7 in “Question about behaviour of git-checkout --patch option”
  1. Merlin BügeMay 25, 2020
  2. Jeff KingMay 27, 2020
  3. Jeff KingMay 27, 2020
  4. Merlin BügeMay 27, 2020
  5. Johannes SchindelinMay 27, 2020
  6. Merlin BügeMay 27, 2020
  7. Johannes SchindelinMay 27, 2020

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.