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

Re: [PATCH 0/4] demonstrate add -p and stash -p failures.

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 14, 2015, 18:00 UTC
Message-ID
<xmqqbniq3803.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1429011168-23216-1-git-send-email-Matthieu.Moy@imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 5 quoted lines
> Playing a bit with add -p and stash -p, I can confirm the bug reported
> by Tanky. This series just adds failing tests, but I couldn't debug it.
>
> I've exhausted my Git time budget for now, so if someone wants to take
> over and fix the bugs, feel free to do it!

I do not have time to dig this either for now, but I suspect this "split a hunk into two overlapping hunks" issue may be related to the caveat in the very original:

http://thread.gmane.org/gmane.comp.version-control.git/76650/focus=87197

where I seem to have said that the proposed change would make "add -p" less robust than the original code (even without 'e'dit):

    Junio C Hamano wrote:
    > 
    > I recall that the original "add--interactive" carefully counted
    > numbers in hunks it reassembles (as it can let you split and then
    > you can choose to use both parts, which requires it to merge
    > overlapping hunks back), but if you are going to use --recount
    > anyway, perhaps we can discard that logic?  It may make the patch
    > application less robust, though.  I dunno.

It seems that we accepted that series saying "let's see what happens" at the end, and I suspect we are seeing its consequences ;-).

Previous: Eric SunshineNext: Matthieu Moy
Message 10 of 17 in “Git add -p “Your edited hunk does not apply. Edit again””
  1. Tanky WooApr 14, 2015
  2. Matthieu MoyApr 14, 2015
  3. 0/4 demonstrate add -p and stash -p failures.Matthieu Moy, Apr 14, 2015
  4. 1/4 add -p: demonstrate failure when running 'edit' after a splitMatthieu Moy, Apr 14, 2015
  5. Eric SunshineApr 14, 2015
  6. 2/4 t3904-stash-patch: fix test descriptionMatthieu Moy, Apr 14, 2015
  7. 3/4 t3904-stash-patch: factor PERL prereq at the top of the fileMatthieu Moy, Apr 14, 2015
  8. 4/4 stash -p: demonstrate failure of split with mixed y/nMatthieu Moy, Apr 14, 2015
  9. Eric SunshineApr 14, 2015
  10. Junio C HamanoApr 14, 2015
  11. 0/5 demonstrate add -p and stash -p failuresMatthieu Moy, Apr 16, 2015
  12. 1/5 t3701-add-interactive: simplify codeMatthieu Moy, Apr 16, 2015
  13. 2/5 add -p: demonstrate failure when running 'edit' after a splitMatthieu Moy, Apr 16, 2015
  14. 3/5 t3904-stash-patch: fix test descriptionMatthieu Moy, Apr 16, 2015
  15. 4/5 t3904-stash-patch: factor PERL prereq at the top of the fileMatthieu Moy, Apr 16, 2015
  16. 5/5 stash -p: demonstrate failure of split with mixed y/nMatthieu Moy, Apr 16, 2015
  17. Matthieu MoyApr 14, 2015

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.