summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-25 20:53:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-26 11:02:55 +0100
commit5683fdc866333b4a3a78401d22dba9c349251eeb (patch)
tree967789a98051d6697df445f8fa8a68b85af8993d
parent6c424ef64a2a38f8b09273f2d212a3b212edc405 (diff)
downloadpoky-5683fdc866333b4a3a78401d22dba9c349251eeb.tar.gz
bitbake: fetch2/git: Improve shallow clone tag fetching
Currently, tags are fetched as just a name, which works but means they're not seen as tags by git commands like git describe. Instead, fetch them as refs/tags/XXX which means such commands then work correctly. (Bitbake rev: c1f30ad61f5e55beb377451887bbbc5cb569f2e5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/git.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 0af8070080..e7b030998c 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -634,7 +634,7 @@ class Git(FetchMethod):
634 all_refs.append(line.split()[-1]) 634 all_refs.append(line.split()[-1])
635 extra_refs = [] 635 extra_refs = []
636 if 'tag' in ud.parm: 636 if 'tag' in ud.parm:
637 extra_refs.append(ud.parm['tag']) 637 extra_refs.append("refs/tags/" + ud.parm['tag'])
638 for r in ud.shallow_extra_refs: 638 for r in ud.shallow_extra_refs:
639 if not ud.bareclone: 639 if not ud.bareclone:
640 r = r.replace('refs/heads/', 'refs/remotes/origin/') 640 r = r.replace('refs/heads/', 'refs/remotes/origin/')