{"thread":{"id":"54208","subject":"No edit option when \"git add --patch\" a new file","startedAt":"2020-09-08T17:27:12Z","lastAt":"2020-09-09T09:33:24Z","messageCount":2,"participants":["Yuchen Ying","Phillip Wood"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"405164","messageId":"CAF6j4hcSEhNvS-DYgNLNn3TdH1vkhgHZRC0fqWer_XM0PQxgYA@mail.gmail.com","threadId":"54208","inReplyTo":null,"subject":"No edit option when \"git add --patch\" a new file","fromName":"Yuchen Ying","fromEmail":"ych@google.com","sentAt":"2020-09-08T16:16:37Z","receivedAt":"2020-09-08T17:27:12Z","isPatch":false,"sender":{"key":"ych@google.com","avatar":null},"body":"Hi list,\n\nI was attempting to \"add --patch\" a newly created file but the \"edit\"\noption is not provided.\n\nSteps to reproduce this problem:\n\n$ echo \"test\\ntest\" > test\n$ git add -N test\n$ git add -p test\n\nExpected: e is an option\nGot:\n\n$ git add -p\ndiff --git a/terraform/test b/terraform/test\nindex 0000000..992533b\n--- /dev/null\n+++ b/terraform/test\nnew file mode 100644\n@@ -0,0 +1,2 @@\n+asdf\n+asdf\n(1/1) Stage addition [y,n,q,a,d,?]? e\nSorry, cannot edit this hunk\n"},{"id":"405235","messageId":"4eb2c8ec-3ee3-5097-9cff-b650caf2c888@gmail.com","threadId":"54208","inReplyTo":"CAF6j4hcSEhNvS-DYgNLNn3TdH1vkhgHZRC0fqWer_XM0PQxgYA@mail.gmail.com","subject":"Re: No edit option when \"git add --patch\" a new file","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2020-09-09T09:33:16Z","receivedAt":"2020-09-09T09:33:24Z","isPatch":false,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 08/09/2020 17:16, Yuchen Ying wrote:\n> Hi list,\n> \n> I was attempting to \"add --patch\" a newly created file but the \"edit\"\n> option is not provided.\n> \n> Steps to reproduce this problem:\n> \n> $ echo \"test\\ntest\" > test\n> $ git add -N test\n> $ git add -p test\n> \n> Expected: e is an option\n> Got:\n> \n> $ git add -p\n> diff --git a/terraform/test b/terraform/test\n> index 0000000..992533b\n> --- /dev/null\n> +++ b/terraform/test\n> new file mode 100644\n> @@ -0,0 +1,2 @@\n> +asdf\n> +asdf\n> (1/1) Stage addition [y,n,q,a,d,?]? e\n> Sorry, cannot edit this hunk\n\nThanks for taking the time to report this issue. I'm currently working\non a fix which I hope to post later today as the issue was previously\nreported at\nhttps://public-inbox.org/git/CAB+jsAW_+NTJjDLG9uMrf4cc5rcwHLD5kTLk7QgvFCgryb22Gw@mail.gmail.com/\nI'll Cc you on the patch\n\nBest Wishes\n\nPhillip\n\n"}]}