From: Luke Shumaker <lukeshu@lukeshu.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Luke Shumaker <lukeshu@lukeshu.com>,
git@vger.kernel.org, Luke Shumaker <lukeshu@datawire.io>,
Elijah Newren <newren@gmail.com>, Jeff King <peff@peff.net>
Subject: Re: [RFC PATCH] fast-export, fast-import: Let tags specify an internal name
Date: Wed, 21 Apr 2021 10:17:51 -0600 [thread overview]
Message-ID: <87lf9b393k.wl-lukeshu@lukeshu.com> (raw)
In-Reply-To: <87zgxs2gp9.fsf@evledraar.gmail.com>
On Wed, 21 Apr 2021 02:18:58 -0600,
Ævar Arnfjörð Bjarmason wrote:
> > Luke Shumaker <lukeshu@lukeshu.com> writes:
> >> This patch adds an optional "name" sub-command to fast-import's "tag"
> >> top-level-command, the stream
> >>
> >> tag foo
> >> name bar
> >> ...
> >>
> >> will create a tag at "refs/tags/foo" that says "tag bar" internally.
...
> All we [fsck] check is that the pseudo-"refname" is valid, i.e. if we were to
> use the thing we find on the "tag" line as a refname, does it pass
> check_refname_format()?
>
> "git tag -v" doesn't care either:
>
> $ git update-ref refs/tags/a-v-2.31.0 3e90d4b58f3819cfd58ac61cb8668e83d3ea0563
> $ git tag -v a-v-2.31.0
> object a5828ae6b52137b913b978e16cd2334482eb4c1f
> type commit
> tag v2.31.0
> tagger Junio C Hamano <gitster@pobox.com> 1615834385 -0700
> [.. snip same gpgp output as for v2.31.0 itself..]
>
> I think at this point the right thing to do is to just explicitly
> document that we ignore it, and that the export/import chain should be
> as forgiving about it as possible.
>
> I.e. we have not cared about this before for validation, and
> e.g. core.alternateRefsPrefixes and such things will break any "it
> should be under refs/tags/" assumption.
>
> 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.
With that in mind, should I flip it around, to have the refname be
more flexible? Have the stream
tag foo
refname refs/tags/bar
...
create a tag at "refs/tags/bar" that says "tag foo" internally?
--
Happy hacking,
~ Luke Shumaker
next prev parent reply other threads:[~2021-04-21 16:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 19:05 [RFC PATCH] fast-export, fast-import: Let tags specify an internal name Luke Shumaker
2021-04-20 21:40 ` Junio C Hamano
2021-04-21 8:18 ` Ævar Arnfjörð Bjarmason
2021-04-21 16:17 ` Luke Shumaker [this message]
2021-04-21 16:59 ` Junio C Hamano
2021-04-21 18:34 ` Elijah Newren
2021-04-21 18:48 ` Luke Shumaker
2021-04-21 19:24 ` Elijah Newren
2021-04-22 8:41 ` Ævar Arnfjörð Bjarmason
2021-04-21 18:41 ` Elijah Newren
2021-04-21 18:54 ` Junio C Hamano
2021-04-21 19:32 ` Elijah Newren
2021-04-22 8:54 ` Ævar Arnfjörð Bjarmason
2021-04-22 19:37 ` Elijah Newren
2021-04-21 8:03 ` Ævar Arnfjörð Bjarmason
2021-04-21 16:34 ` Luke Shumaker
2021-04-21 17:26 ` Luke Shumaker
2021-04-21 18:26 ` Elijah Newren
2021-04-21 17:48 ` Junio C Hamano
2021-04-23 16:47 ` Luke Shumaker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lf9b393k.wl-lukeshu@lukeshu.com \
--to=lukeshu@lukeshu.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=lukeshu@datawire.io \
--cc=newren@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.