Re: [PATCH v1 1/3] replace: add --graft option
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 23, 2014, 22:59 UTC
- Message-ID
- <CAPig+cRG_LsV3q1qRP7C6LpFA7hcBCDmX8Xm=6AdxtRmY3oYWQ@mail.gmail.com>
- In-Reply-To
- <xmqqd2f4i41l.fsf@gitster.dls.corp.google.com>
On Fri, May 23, 2014 at 5:22 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Jeff King <peff@peff.net> writes: > >> On Fri, May 23, 2014 at 01:05:40PM -0700, Junio C Hamano wrote: >> >>> I just read read_graft_line(); it allows an empty line (both >>> length-0 before the terminating LF or CRLF, and a line with >>> isspace() only) and ignore them, so "grep '^[^#]'" is not >>> sufficient. >> >> Thanks, I missed the space trimming. I think: >> >> grep '^[^# \t]' >> >> would be enough, though I am not sure that "\t" is portable over a raw >> tab.
'grep' does not recognize "\t" on BSD or derivatives, such as Mac OS X. (Nor does 'sed'.)