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

"add -p" breakage

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 6, 2011, 20:09 UTC
Message-ID
<7v4o6bi1lm.fsf_-_@alter.siamese.dyndns.org>
In-Reply-To
<7voc4ji23p.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 11 quoted lines
> Arnaud Lacombe <lacombar@gmail.com> writes:
>
>> This commit introduces a regression when editing splithunks using "git
>> add -p". Reverting the patch fix the regression.
>
> Thanks for a report.  I don't have a time to look at this now; help from
> "add -p" people would be appreciated.
>
> I have a suspicion that the symptom may be a bug in "add -p" exposed by
> the change; "add -p" which used to count the patch lines carefully itself,
> but was modified to use 'apply --recount' in more recent versions.

Sorry, not that one, but what "add -p" used to carefully do but punts these days is to combine adjacent hunks correctly. I suspect that laziness is coming back and haunt us, and if that is the case, we should fix it there, and should not work it around by breaking the normal patch application codepath.

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 6 in “[ANNOUNCE] Git 1.7.4.3”
  1. Junio C HamanoApr 3, 2011
  2. Arnaud LacombeApr 6, 2011
  3. Junio C HamanoApr 6, 2011
  4. "add -p" breakageJunio C Hamano, Apr 6, 2011
  5. add--interactive.perl: factor out repeated --recount optionJunio C Hamano, Apr 6, 2011
  6. "add -p": work-around an old laziness that does not coalesce hunksJunio C Hamano, Apr 6, 2011

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.