Re: [PATCH 04/10] fast-export: avoid dying when filtering by paths and old tags exist
- From
Jeff King <peff@peff.net>
- Date
- Nov 13, 2018, 14:38 UTC
- Message-ID
- <20181113143822.GA17454@sigill.intra.peff.net>
- In-Reply-To
- <20181112225043.GJ890086@genre.crustytoothpaste.net>
On Mon, Nov 12, 2018 at 10:50:43PM +0000, brian m. carlson wrote:
Show 13 quoted lines
> On Sun, Nov 11, 2018 at 01:44:43AM -0500, Jeff King wrote:
> > > + git fast-export --tag-of-filtered-object=rewrite --all -- bar >output &&
> > > + grep -A 1 refs/tags/v0.0.0.0.0.0.1 output | grep -E ^from.0{40}
> >
> > I don't think "grep -A" is portable (and we don't seem to otherwise use
> > it). You can probably do something similar with sed.
> >
> > Use $ZERO_OID instead of hard-coding 40, which future-proofs for the
> > hash transition (though I suppose the hash is not likely to get
> > _shorter_ ;) ).
>
> It would indeed be nice if we used $ZERO_OID. Also, we prefer to write
> "egrep", since some less capable systems don't have a grep with -E.I thought that, too, but it is only "grep -F" that has been a problem for us in the past, and we have many "grep -E" calls already. c.f. https://public-inbox.org/git/20180910154453.GA15270@sigill.intra.peff.net/
-Peff