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

git apply --interactive

From
Mark Lodato <lodatom@gmail.com>
Date
May 7, 2013, 02:08 UTC
Message-ID
<CAHREChgni3iiONUO28FoVbQzjAe83ysRRzuYC2jEqkgntV-BYQ@mail.gmail.com>

I'd love for "git apply" to have an equivalent to "git add -p". (I'm guessing it would be called --interactive since "git apply -p" is taken and --patch would be confusing.) Has anyone thought about this?

After taking a quick look at git-add--interactive.perl, it seems like
the main steps would be:
1) making sure the patch comes from a file and not stdin, since stdin
is required for the interactive input
2) collecting the input patch(es) and separating by output file
3) modifying parse_diff to accept these pre-split patches
4) coloring the patch
Mark
Message 1 of 1 in “git apply --interactive”
  1. Mark LodatoMay 7, 2013

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.