summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2017-04-28 19:03:24 +0100
committerBen Brown <ben.brown@codethink.co.uk>2017-04-28 19:21:37 +0100
commit035c988ecbba04ea2bb5353bd437641b7f920714 (patch)
tree5355d207fe327840d476d26787827692737a3c2b
parent3dbd381aa97cf1be8405ded03097982777523802 (diff)
downloadybd-035c988ecbba04ea2bb5353bd437641b7f920714.tar.gz
Resolve 'sha' if it exists over 'ref' in get_tree()
The 'sha' field should override 'ref' when generating cache-keys as it does when checking out for building.
-rw-r--r--ybd/repos.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ybd/repos.py b/ybd/repos.py
index 2b32713..cdf1578 100644
--- a/ybd/repos.py
+++ b/ybd/repos.py
@@ -89,7 +89,7 @@ def get_last_tag(gitdir):
def get_tree(dn):
- ref = str(dn.get('ref', str(dn.get('sha'))))
+ ref = str(dn.get('sha', str(dn.get('ref'))))
track = app.config.get('track-branches')
if dn.get('unpetrify-ref') and track:
if track is True or dn['path'] in track: