From: Luke Shumaker <lukeshu@lukeshu.com>
To: git@vger.kernel.org
Cc: "Elijah Newren" <newren@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
"brian m . carlson " <sandals@crustytoothpaste.net>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Luke Shumaker" <lukeshu@datawire.io>
Subject: [PATCH 0/3] fast-export, fast-import: let tags specify a different refname
Date: Wed, 21 Apr 2021 19:06:56 -0600 [thread overview]
Message-ID: <20210422010659.2498280-1-lukeshu@lukeshu.com> (raw)
From: Luke Shumaker <lukeshu@datawire.io>
After receiving positive feedback on the RFC, here's the polished-up
v1.
This patchset adds an optional "refname" sub-command to fast-import's "tag"
top-level-command; the stream
tag foo
refname refs/tags/bar
...
will create a tag at "refs/tags/bar" that says "tag foo" internally.
If there is no "refname" line, it will continue with the existing
behavior of using "refs/tags/<tagname>" as the refname.
This makes it now-possible for fast-export/fast-import to represent
tags for which the internal tagname and the refname disagree. It also
adds support for tags with refnames that do not begin with
"refs/tags/". I discuss the motivation for supporting this in the
commit message of the 3rd patch.
Changes from the RFC:
- I've flipped it around; the existing `tag` line now specifices the
tagname, and the added `refname` line now specifies the refname
(rather than having the `tag` line specify the suffix of the
refname, and the added `name` line specify the tagname). This
allows for tags whose refnames to not begin with "refs/tags/".
- I've added prose documentation, rather than just updating the BNF.
(The wording is based on what Junio suggested on the RFC.)
- I added tests.
- After responding to feedback, I ended up with just enough "moving
and renaming things" noise that in the single commit that for v1 I
split that out in to a econd commit.
- While implementing the tests, I discovered a pre-existing bug with
nested tags, so I added a separate third commit to fix that.
This passes all of the GitHub Actions CI checks, and passes all but
one of the Travis-CI checks; the failing Travis-CI check seems to be
an unrelated 404 from `apt-get`.
https://github.com/LukeShu/git/runs/2405478827
[1]: https://lore.kernel.org/git/Pine.LNX.4.58.0506221433540.2353@ppc970.osdl.org/
Luke Shumaker (3):
fast-export, fast-import: make stylistic changes
fast-export: fix bug with nested tags
fast-export, fast-import: let tags specify a different refname
Documentation/git-fast-import.txt | 22 +++++++++------
builtin/fast-export.c | 47 ++++++++++++++++++++++++++-----
builtin/fast-import.c | 47 +++++++++++++++++++------------
t/t9350-fast-export.sh | 20 ++++++++++---
4 files changed, 98 insertions(+), 38 deletions(-)
--
2.31.1
Happy hacking,
~ Luke Shumaker
next reply other threads:[~2021-04-22 1:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 1:06 Luke Shumaker [this message]
2021-04-22 1:06 ` [PATCH 1/3] fast-export, fast-import: make stylistic changes Luke Shumaker
2021-04-22 1:06 ` [PATCH 2/3] fast-export: fix bug with nested tags Luke Shumaker
2021-04-22 1:06 ` [PATCH 3/3] fast-export, fast-import: let tags specify a different refname 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=20210422010659.2498280-1-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 \
--cc=sandals@crustytoothpaste.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).