git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* No edit option when "git add --patch" a new file
@ 2020-09-08 16:16 Yuchen Ying
  2020-09-09  9:33 ` Phillip Wood
  0 siblings, 1 reply; 2+ messages in thread
From: Yuchen Ying @ 2020-09-08 16:16 UTC (permalink / raw)
  To: git

Hi list,

I was attempting to "add --patch" a newly created file but the "edit"
option is not provided.

Steps to reproduce this problem:

$ echo "test\ntest" > test
$ git add -N test
$ git add -p test

Expected: e is an option
Got:

$ git add -p
diff --git a/terraform/test b/terraform/test
index 0000000..992533b
--- /dev/null
+++ b/terraform/test
new file mode 100644
@@ -0,0 +1,2 @@
+asdf
+asdf
(1/1) Stage addition [y,n,q,a,d,?]? e
Sorry, cannot edit this hunk

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: No edit option when "git add --patch" a new file
  2020-09-08 16:16 No edit option when "git add --patch" a new file Yuchen Ying
@ 2020-09-09  9:33 ` Phillip Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Phillip Wood @ 2020-09-09  9:33 UTC (permalink / raw)
  To: Yuchen Ying, git

On 08/09/2020 17:16, Yuchen Ying wrote:
> Hi list,
> 
> I was attempting to "add --patch" a newly created file but the "edit"
> option is not provided.
> 
> Steps to reproduce this problem:
> 
> $ echo "test\ntest" > test
> $ git add -N test
> $ git add -p test
> 
> Expected: e is an option
> Got:
> 
> $ git add -p
> diff --git a/terraform/test b/terraform/test
> index 0000000..992533b
> --- /dev/null
> +++ b/terraform/test
> new file mode 100644
> @@ -0,0 +1,2 @@
> +asdf
> +asdf
> (1/1) Stage addition [y,n,q,a,d,?]? e
> Sorry, cannot edit this hunk

Thanks for taking the time to report this issue. I'm currently working
on a fix which I hope to post later today as the issue was previously
reported at
https://public-inbox.org/git/CAB+jsAW_+NTJjDLG9uMrf4cc5rcwHLD5kTLk7QgvFCgryb22Gw@mail.gmail.com/
I'll Cc you on the patch

Best Wishes

Phillip


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-09  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-08 16:16 No edit option when "git add --patch" a new file Yuchen Ying
2020-09-09  9:33 ` Phillip Wood

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git