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

Re: [PATCH] rebase -i: respect core.commentchar

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 11, 2013, 21:49 UTC
Message-ID
<7va9raldw8.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130211213900.GE2270@serenity.lan>
John Keeping <john@keeping.me.uk> writes:
Show 20 quoted lines
>> I do not think we would want to worry about comment_char being a
>> funny character that can possibly interfere with regexp.  Can't we
>> do this with "git stripspace" piped to "wc -l" or something?
>
> I didn't know about "git stripspace",...
>> > -# If you remove a line here THAT COMMIT WILL BE LOST.
>> > +	sed -e "s/^/$comment_char /" >>"$todo" <<EOF
>> 
>> When $comment_char is slash or backslash this will break.
>> Perhaps "stripspace --comment-lines" can be used here.
>
> Not in this case - this is adding the comment char in front of each
> line.  Is there a better option than this?
>
> 	while read -r line
> 	do
> 		printf '%s %s\n' "$comment_char" "$line"
> 	done >> "$todo" <<EOF
> 	...
> 	EOF
Perhaps
	git stripspace --comment-lines <<EOF
        ...
        EOF
is a better option that that loop.
Previous: John KeepingNext: John Keeping
Message 4 of 13 in “rebase -i: respect core.commentchar”
  1. rebase -i: respect core.commentcharJohn Keeping, Feb 11, 2013
  2. Junio C HamanoFeb 11, 2013
  3. John KeepingFeb 11, 2013
  4. Junio C HamanoFeb 11, 2013
  5. rebase -i: respect core.commentcharJohn Keeping, Feb 11, 2013
  6. Junio C HamanoFeb 12, 2013
  7. John KeepingFeb 12, 2013
  8. Junio C HamanoFeb 12, 2013
  9. John KeepingFeb 12, 2013
  10. Junio C HamanoFeb 12, 2013
  11. Junio C HamanoFeb 12, 2013
  12. John KeepingFeb 12, 2013
  13. Junio C HamanoFeb 12, 2013

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.