Re: [PATCH] rebase -i: Fix possibly wrong onto hash in todo
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Aug 12, 2020, 14:03 UTC
- Message-ID
- <20200812140352.GC74542@syl.lan>
- In-Reply-To
- <xmqqft8t9f55.fsf@gitster.c.googlers.com>
On Tue, Aug 11, 2020 at 12:05:58PM -0700, Junio C Hamano wrote:
Show 22 quoted lines
> Taylor Blau <me@ttaylorr.com> writes: > > > On Tue, Aug 11, 2020 at 11:58:14AM -0700, Junio C Hamano wrote: > >> Antti Keränen <antti@keraset.fi> writes: > >> > >> > On Tue, Aug 11, 2020 at 11:36:21AM -0400, Taylor Blau wrote: > >> >> Ack, I noticed this too during my review, but apparently forgot to > >> >> comment on it. I'm puzzled by the first '..*'. If you're searching for > >> >> any non-empty string, how about '.+' instead? > >> > > >> > That's true. Good point. I pretty much copy&pasted the 'todo count' test > >> > so I didn't give this much thought. I'll fix this. > >> > >> Please don't shorten ..* into .+ if you are writing a portable sed > >> script---stick to the BRE. > > > > Sure, and sorry -- I didn't know that we cared about the difference > > between BRE and ERE. Do you prefer ..* over .\+? Both should be > > supported in BRE, if I'm reading [1] correctly. > > I thought that BRE only commands taking backslash-quoted ERE was GNU > extension?
*Grumble*, it's not anywhere in POSIX:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html
...making this a GNU-ism.
> Look for "stick to a subset of BRE" in Documention/CodingGuidelines; > we may need to update the document to raise the baseline to match > the reality of year 2020, though.
So, I think the "reality of year 2020" is that we still write '..*' instead of '.\+'.
Thanks, Taylor