From: brian m. carlson Date: Mon, 12 Nov 2018 22:50:43 GMT Subject: Re: [PATCH 04/10] fast-export: avoid dying when filtering by paths and old tags exist Message-ID: <20181112225043.GJ890086@genre.crustytoothpaste.net> In-Reply-To: <20181111064442.GD30850@sigill.intra.peff.net> 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. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204