Re: [PATCH 2/3] transport.c: introduce core.alternateRefsCommand
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 21, 2018, 19:59 UTC
- Message-ID
- <xmqqr2hmvcyz.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180921175739.GA21514@syl>
Taylor Blau <me@ttaylorr.com> writes:
Show 6 quoted lines
> In fact, I think that we can go even further: since we don't need to
> catch the beginning '^.*' (without -o), we can instead:
>
> extract_haves () {
> depacketize - | grep '\.have' | sed -e 's/\\0.*$//g'
> }Do not pipe grep into sed, unless you have an overly elaborate set of patterns to filter with, e.g. something along the lines of...
sed -ne '/\.have/s/...//p'