diff options
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 5ffab220569..7f7296f6b1e 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -356,7 +356,10 @@ class Git(FetchMethod): """ Compute the HEAD revision for the url """ - output = self._lsremote(ud, d, "") + if d.getVar("BB_FETCH_PREMIRRORONLY", True) and ud.proto != "file": + return "HEAD" + else: + output = self._lsremote(ud, d, "") # Tags of the form ^{} may not work, need to fallback to other form if ud.unresolvedrev[name][:5] == "refs/": head = ud.unresolvedrev[name] |