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

git add -p does not work with custom comment char currently

From
CRChristian Rösch <christian@croesch.de>
Date
Jun 21, 2017, 16:31 UTC
Message-ID
<89d4e348-167e-b201-d243-63b1156b9ed0@croesch.de>
Hi,
my ~/.gitconfig contains
[core]
    commentchar = $

as far as I can see with 2.13.0 and 2.13.1.516.g05ec6e1 (built from source) if I do

$ git add -p
and edit the hunk manually the comment char is not parsed correctly:

Stage this hunk [y,n,q,a,d,/,s,e,?]? e warning: recount: unexpected line: $ Manual hunk edit mode -- see bottom for a quick guide.

error: corrupt patch at line 6 Your edited hunk does not apply. Edit again (saying "no" discards!) [y/n]? n

As far as I can tell this is a bug but it would be nice if you could let me know if it works for you with a custom comment char.

Thanks in advance, Christian

Next: Jeff King
Message 1 of 6 in “git add -p does not work with custom comment char currently”
  1. Christian RöschJun 21, 2017
  2. Jeff KingJun 21, 2017
  3. 0/2 Re: git add -p does not work with custom comment char currentlyJeff King, Jun 21, 2017
  4. 1/2 add--interactive: handle EOF in prompt_yesnoJeff King, Jun 21, 2017
  5. 2/2 add--interactive: quote commentChar regexJeff King, Jun 21, 2017
  6. Christian RöschJun 21, 2017

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.