Re: [RFC PATCH] fast-export, fast-import: Let tags specify an internal name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 21, 2021 at 11:50 AM Luke Shumaker <lukeshu@xxxxxxxxxxx> wrote:
>
> On Wed, 21 Apr 2021 12:34:26 -0600,
> Elijah Newren wrote:
> > On Wed, Apr 21, 2021 at 1:19 AM Ævar Arnfjörð Bjarmason
> > <avarab@xxxxxxxxx> wrote:
> > > There's also perfectly legitimate in-the-wild use-cases for this,
> > > e.g. "archiving" tags to not-refs/tags/* so e.g. the upload-pack logic
> > > doesn't consider and follow them. Not being able to export/import those
> > > repositories as-is due to an overzelous data check there that's not in
> > > fsck.c would suck.
> >
> > Not would suck, but does suck.  I had to document it as a shortcoming
> > of fast-export/fast-import -- see
> > https://www.mankier.com/1/git-filter-repo#Internals-Limitations, where
> > I wrote, "annotated and signed tags outside of the refs/tags/
> > namespace are not supported (their location will be mangled in weird
> > ways)".
> >
> > The problem is, what's the right backward-compatible way to fix this?
> > Do we have to add a flag to both fast-export and fast-import to stop
> > assuming a "refs/tags/" prefix and use the full refname, and require
> > the user to pass both flags?  How is fast-import supposed to know that
> > "refs/alternate-tags/foo" is or isn't
> > "refs/tags/refs/alternate-tags/foo"?
> >
> > And if we need such a flag, should fast-import die if it sees this new
> > "name" directive and the flag isn't given?
>
> Elsehwere in the thread, I responded to some feedback by suggesting
> that perhaps I should flip it around, and instead add a 'refname'
> sub-command, and have it default to 'refs/tags/{tagname}'
>
> So the stream
>
>     tag foo
>     ...
>
> would create a tag at "refs/tags/foo" that says "tag foo".  And the
> stream
>
>     tag bar
>     refname refs/alternate-tags/baz
>
> would create a tag at "refs/alternate-tags/baz" that says "tag bar".
>
> Grepping for "refs/tags" in fast-export.c and fast-import.c, I think
> that would fully address this concern.

Ah, I missed that while skimming and trying to catch up.  Sounds good!




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux