Re: [PATCH 04/10] fast-export: avoid dying when filtering by paths and old tags exist
- From
Jeff King <peff@peff.net>
- Date
- Nov 12, 2018, 12:32 UTC
- Message-ID
- <20181112123232.GF3956@sigill.intra.peff.net>
- In-Reply-To
- <CABPp-BFy1aS3mHGF99Lr=+APruzC3pF5PCEph8SU71uuyOnQ7Q@mail.gmail.com>
On Sat, Nov 10, 2018 at 11:38:45PM -0800, Elijah Newren wrote:
Show 16 quoted lines
> > 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 > > > > ? If I have a tag pointing to HEAD~10, will this delete that? Ideally I > > think it would be left alone. > > A couple things: > * This code path only triggers in a very specific case: If a tag is > requested for export but points to a commit which is filtered out by > something else (e.g. path limiters and the commit in question didn't > modify any of the relevant paths), AND the user explicitly specified > --tag-of-filtered-object=rewrite (so that the tag in question can be > rewritten to the nearest non-filtered ancestor).
Right, I think this is the bit I was missing: somebody has to have explicitly asked to export the tag. At which point the only sensible thing to do is drop it.
-Peff