From b56a3354817b53d0e512166a087ee441a437f216 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 18 Mar 2025 12:14:46 +0000 Subject: [PATCH] bitbake: fetch/git: Ensure tags work with shallow clones If we want to validate a tag when using shallow clones, we need to ensure the tag is imported to the clone. Adding to extra_refs allows this to happen ensuring tag validation in shallow clones works. (Bitbake rev: 03945475886b8d31c7eccc80fe594ab5306bcf5d) Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 53fdc4c3df..7fda9d2753 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -674,6 +674,8 @@ class Git(FetchMethod): for line in all_refs_remote: all_refs.append(line.split()[-1]) extra_refs = [] + if 'tag' in ud.parm: + extra_refs.append(ud.parm['tag']) for r in ud.shallow_extra_refs: if not ud.bareclone: r = r.replace('refs/heads/', 'refs/remotes/origin/')