Re: [PATCH 04/10] fast-export: avoid dying when filtering by paths and old tags exist

2018-11-13 Thread Jeff King
On Mon, Nov 12, 2018 at 10:50:43PM +, brian m. carlson wrote: > 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

Re: [PATCH 04/10] fast-export: avoid dying when filtering by paths and old tags exist

2018-11-12 Thread brian m. carlson
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

Re: [PATCH 04/10] fast-export: avoid dying when filtering by paths and old tags exist

2018-11-12 Thread Jeff King
On Sat, Nov 10, 2018 at 11:38:45PM -0800, Elijah Newren wrote: > > Hmm. That's the right thing to do if we're considering the export to be > > an independent unit. But what if I'm just rewriting a portion of history > > like: > > > > git fast-export HEAD~5..HEAD | some_filter | git fast-import

Re: [PATCH 04/10] fast-export: avoid dying when filtering by paths and old tags exist

2018-11-10 Thread Elijah Newren
On Sat, Nov 10, 2018 at 10:44 PM Jeff King wrote: > > On Sat, Nov 10, 2018 at 10:23:06PM -0800, Elijah Newren wrote: > > > If --tag-of-filtered-object=rewrite is specified along with a set of > > paths to limit what is exported, then any tags pointing to old commits > > that do not contain any of

Re: [PATCH 04/10] fast-export: avoid dying when filtering by paths and old tags exist

2018-11-10 Thread Jeff King
On Sat, Nov 10, 2018 at 10:23:06PM -0800, Elijah Newren wrote: > If --tag-of-filtered-object=rewrite is specified along with a set of > paths to limit what is exported, then any tags pointing to old commits > that do not contain any of those specified paths cause problems. Since > the old tagged

[PATCH 04/10] fast-export: avoid dying when filtering by paths and old tags exist

2018-11-10 Thread Elijah Newren
If --tag-of-filtered-object=rewrite is specified along with a set of paths to limit what is exported, then any tags pointing to old commits that do not contain any of those specified paths cause problems. Since the old tagged commit is not exported, fast-export attempts to rewrite such tags to an