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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Keeping <john@xxxxxxxxxxxxx> writes:

>> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]