summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/fetch2/git.py')
-rw-r--r--lib/bb/fetch2/git.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 6bcc4a483..f05a360f1 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -72,7 +72,8 @@ class Git(FetchMethod):
ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
for name in ud.names:
- if not ud.revisions[name] or ud.revisions[name] == "master":
+ # Ensure anything that doesn't look like a sha256 checksum/revision is translated into one
+ if not ud.revisions[name] or len(ud.revisions[name]) != 40 or (False in [c in "abcdef0123456789" for c in ud.revisions[name]]):
ud.revisions[name] = self.latest_revision(url, ud, d, name)
ud.localfile = ud.clonedir