summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-18 12:14:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-19 11:46:30 +0000
commitb56a3354817b53d0e512166a087ee441a437f216 (patch)
tree83319e4a1a002427f258df5eb09bb77daa5af67a /bitbake/lib/bb/fetch2/git.py
parent18a533bfe6d4d5020c0252f9aecf6fc4abda672e (diff)
downloadpoky-b56a3354817b53d0e512166a087ee441a437f216.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py2
1 files changed, 2 insertions, 0 deletions
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):
674 for line in all_refs_remote: 674 for line in all_refs_remote:
675 all_refs.append(line.split()[-1]) 675 all_refs.append(line.split()[-1])
676 extra_refs = [] 676 extra_refs = []
677 if 'tag' in ud.parm:
678 extra_refs.append(ud.parm['tag'])
677 for r in ud.shallow_extra_refs: 679 for r in ud.shallow_extra_refs:
678 if not ud.bareclone: 680 if not ud.bareclone:
679 r = r.replace('refs/heads/', 'refs/remotes/origin/') 681 r = r.replace('refs/heads/', 'refs/remotes/origin/')