From: Mario Limonciello <superm1@gmail.com>
To: tools@linux.kernel.org
Cc: Mario Limonciello <superm1@gmail.com>,
Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH] Fall back to non-annotated tags for pull requests
Date: Mon, 13 Nov 2023 22:28:35 -0600 [thread overview]
Message-ID: <20231114042835.48432-1-superm1@gmail.com> (raw)
Not everyone uses an annotated tag, so fallback to a direct ref
tag if annotated tags fail.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
b4/pr.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/b4/pr.py b/b4/pr.py
index 6c01e2b..e62690b 100644
--- a/b4/pr.py
+++ b/b4/pr.py
@@ -71,7 +71,11 @@ def git_get_commit_id_from_repo_ref(repo, ref):
lines = b4.git_get_command_lines(None, ['ls-remote', repo, 'refs/tags/%s^{}' % ref])
elif ref.find('tags/') == 0:
+ #try as an annotated tag first
lines = b4.git_get_command_lines(None, ['ls-remote', repo, 'refs/%s^{}' % ref])
+ if not lines:
+ # try it as a non-annotated tag, then
+ lines = b4.git_get_command_lines(None, ['ls-remote', repo, 'refs/%s' % ref])
else:
# Grab it as a head and hope for the best
--
2.41.0
next reply other threads:[~2023-11-14 4:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 4:28 Mario Limonciello [this message]
2024-01-23 23:04 ` [PATCH] Fall back to non-annotated tags for pull requests Konstantin Ryabitsev
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=20231114042835.48432-1-superm1@gmail.com \
--to=superm1@gmail.com \
--cc=mario.limonciello@amd.com \
--cc=tools@linux.kernel.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).