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

Re: Git add -p “Your edited hunk does not apply. Edit again”

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Apr 14, 2015, 14:00 UTC
Message-ID
<vpqegnmizce.fsf@anie.imag.fr>
In-Reply-To
<CALv9gbMshdNhB58Otx5h8rmtCAU4qo9eNTqKSMzD_Phy7Sataw@mail.gmail.com>
Tanky Woo <wtq1990@gmail.com> writes:
Show 7 quoted lines
> Stash this hunk [y,n,q,a,d,/,j,J,g,e,?]? y
> @@ -2,3 +3,4 @@
>  bbb
> +added line 2
>  ccc
>  ddd
> Stash this hunk [y,n,q,a,d,/,K,g,e,?]? y

My version does n, y, not y, y. The problem is the mix of stashed/not stashed hunks. See my other message for a reproducible test, it does fail on Git master.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Matthieu Moy
Message 17 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.