From: Peter Kjellerstedt <pkj@axis.com>
To: <bitbake-devel@lists.openembedded.org>
Subject: [PATCH] fetch2/git: Only fetch extra shallow refs that exist
Date: Sat, 20 Jun 2026 19:44:16 +0200 [thread overview]
Message-ID: <20260620174416.1489364-1-pkj@axis.com> (raw)
When using BB_GIT_SHALLOW_EXTRA_REFS in combination with a recipe that
fetches multiple URLs, make sure to only fetch the references that exist
in the respective remote repositories.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
lib/bb/fetch2/git.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 0fbd85441..3f723ca62 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -640,7 +640,7 @@ class Git(FetchMethod):
if '*' in r:
matches = filter(lambda a: fnmatch.fnmatchcase(a, r), all_refs)
extra_refs.extend(matches)
- else:
+ elif r in all_refs:
extra_refs.append(r)
for ref in extra_refs:
next reply other threads:[~2026-06-20 17:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-20 17:44 Peter Kjellerstedt [this message]
2026-06-23 8:07 ` [bitbake-devel] [PATCH] fetch2/git: Only fetch extra shallow refs that exist Mathieu Dubois-Briand
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=20260620174416.1489364-1-pkj@axis.com \
--to=pkj@axis.com \
--cc=bitbake-devel@lists.openembedded.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