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

Re: Change behavior of git add --patch on newly added file?

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 13, 2019, 01:47 UTC
Message-ID
<xmqqv9roczt2.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20191112184720.GB38770@google.com>
Emily Shaffer <emilyshaffer@google.com> writes:
Show 9 quoted lines
>> Patches welcome, but you may want to check with Dscho as there is an
>> effort going on to reimplement the entire "add -i" machinery in C.
>
> Ah, this is a compelling point. I imagine the landscape will be fairly
> different when that effort is finished.
>
>
> From the replies, it sounds like it's a favorable change, but it makes
> sense to wait on it considering the refactor to use C. Thanks, all.

Peff's "how would you tell between genuinely untracked ones and those you would want to add" and "should 'add -p' with no pathspec attempt to 'add -N' everything under the sun?" are both quite valid points. I already raised "'add -N && add -p' would give you a single hunk that adds everything. Are you willing to manually split, and how well would it work?" in a separate message. These design issues can be resolved without coding, and should be resolved before you start randomly typing ;-)

Thanks.
Previous: Johannes SchindelinNext: Jeff King
Message 6 of 7 in “Change behavior of git add --patch on newly added file?”
  1. Emily ShafferNov 8, 2019
  2. Junio C HamanoNov 9, 2019
  3. Junio C HamanoNov 9, 2019
  4. Emily ShafferNov 12, 2019
  5. Johannes SchindelinNov 12, 2019
  6. Junio C HamanoNov 13, 2019
  7. Jeff KingNov 11, 2019

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.