From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Tanky Woo <wtq1990@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git add -p “Your edited hunk does not apply. Edit again”
Date: Tue, 14 Apr 2015 11:43:05 +0200 [thread overview]
Message-ID: <vpq7ftfkpue.fsf@anie.imag.fr> (raw)
In-Reply-To: loom.20150414T035141-286@post.gmane.org
Tanky Woo <wtq1990@gmail.com> writes:
> - coverage erase
> +
> +covhtml:
> + make clean
> + nosetests
> + coverage html
> + cd ${HTMLCOV} && python -m SimpleHTTPServer
> So I use e to manually edit the hunk, I delete all the + lines, it seems:
I can reproduce on git.git's master. Actually, you don't even have to
edit the patch, just save and exit, and you get the same error message.
So it's clearly a bug.
I can get the same kind of bug with "stash -p", without even using the
'e' command, by doing "split" and then answer n, y. On a simpler example
with two hunks:
$ git stash -p
diff --git a/bar.txt b/bar.txt
index 35fbd83..1d3fda3 100644
--- a/bar.txt
+++ b/bar.txt
@@ -1,4 +1,6 @@
aaa
+added line 1
bbb
+added line 2
ccc
ddd
Stash this hunk [y,n,q,a,d,/,s,e,?]? s
Split into 2 hunks.
@@ -1,2 +1,3 @@
aaa
+added line 1
bbb
Stash this hunk [y,n,q,a,d,/,j,J,g,e,?]? n
@@ -2,3 +3,4 @@
bbb
+added line 2
ccc
ddd
Stash this hunk [y,n,q,a,d,/,K,g,e,?]? y
Saved working directory and index state WIP on master: 1cad001 abcd
error: patch failed: bar.txt:1
error: bar.txt: patch does not apply
Cannot remove worktree changes
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2015-04-14 9:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-14 1:56 Git add -p “Your edited hunk does not apply. Edit again” Tanky Woo
2015-04-14 9:43 ` Matthieu Moy [this message]
2015-04-14 11:32 ` [PATCH 0/4] demonstrate add -p and stash -p failures Matthieu Moy
2015-04-14 11:32 ` [PATCH 1/4] add -p: demonstrate failure when running 'edit' after a split Matthieu Moy
2015-04-14 20:46 ` Eric Sunshine
2015-04-14 11:32 ` [PATCH 2/4] t3904-stash-patch: fix test description Matthieu Moy
2015-04-14 11:32 ` [PATCH 3/4] t3904-stash-patch: factor PERL prereq at the top of the file Matthieu Moy
2015-04-14 11:32 ` [PATCH 4/4] stash -p: demonstrate failure of split with mixed y/n Matthieu Moy
2015-04-14 20:46 ` Eric Sunshine
2015-04-14 18:00 ` [PATCH 0/4] demonstrate add -p and stash -p failures Junio C Hamano
2015-04-16 7:02 ` [PATCH v2 0/5] " Matthieu Moy
2015-04-16 7:02 ` [PATCH v2 1/5] t3701-add-interactive: simplify code Matthieu Moy
2015-04-16 7:02 ` [PATCH v2 2/5] add -p: demonstrate failure when running 'edit' after a split Matthieu Moy
2015-04-16 7:02 ` [PATCH v2 3/5] t3904-stash-patch: fix test description Matthieu Moy
2015-04-16 7:02 ` [PATCH v2 4/5] t3904-stash-patch: factor PERL prereq at the top of the file Matthieu Moy
2015-04-16 7:02 ` [PATCH v2 5/5] stash -p: demonstrate failure of split with mixed y/n Matthieu Moy
[not found] ` <CALv9gbMshdNhB58Otx5h8rmtCAU4qo9eNTqKSMzD_Phy7Sataw@mail.gmail.com>
2015-04-14 14:00 ` Git add -p “Your edited hunk does not apply. Edit again” Matthieu Moy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpq7ftfkpue.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=wtq1990@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.