diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 55dd084abc..14ec45a3f6 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -199,6 +199,8 @@ class Git(FetchMethod): | |||
199 | ud.shallow_skip_fast = False | 199 | ud.shallow_skip_fast = False |
200 | ud.shallow = d.getVar("BB_GIT_SHALLOW") == "1" | 200 | ud.shallow = d.getVar("BB_GIT_SHALLOW") == "1" |
201 | ud.shallow_extra_refs = (d.getVar("BB_GIT_SHALLOW_EXTRA_REFS") or "").split() | 201 | ud.shallow_extra_refs = (d.getVar("BB_GIT_SHALLOW_EXTRA_REFS") or "").split() |
202 | if 'tag' in ud.parm: | ||
203 | ud.shallow_extra_refs.append("refs/tags/" + ud.parm['tag']) | ||
202 | 204 | ||
203 | depth_default = d.getVar("BB_GIT_SHALLOW_DEPTH") | 205 | depth_default = d.getVar("BB_GIT_SHALLOW_DEPTH") |
204 | if depth_default is not None: | 206 | if depth_default is not None: |
@@ -633,8 +635,6 @@ class Git(FetchMethod): | |||
633 | for line in all_refs_remote: | 635 | for line in all_refs_remote: |
634 | all_refs.append(line.split()[-1]) | 636 | all_refs.append(line.split()[-1]) |
635 | extra_refs = [] | 637 | extra_refs = [] |
636 | if 'tag' in ud.parm: | ||
637 | extra_refs.append(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/') |
@@ -660,7 +660,7 @@ class Git(FetchMethod): | |||
660 | subdir = ud.parm.get("subdir") | 660 | subdir = ud.parm.get("subdir") |
661 | subpath = ud.parm.get("subpath") | 661 | subpath = ud.parm.get("subpath") |
662 | readpathspec = "" | 662 | readpathspec = "" |
663 | def_destsuffix = "git/" | 663 | def_destsuffix = (d.getVar("BB_GIT_DEFAULT_DESTSUFFIX") or "git") + "/" |
664 | 664 | ||
665 | if subpath: | 665 | if subpath: |
666 | readpathspec = ":%s" % subpath | 666 | readpathspec = ":%s" % subpath |