aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/update.py
diff options
context:
space:
mode:
Diffstat (limited to 'layerindex/update.py')
-rwxr-xr-xlayerindex/update.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/layerindex/update.py b/layerindex/update.py
index 5b5fc43d73..c0a9f88c9f 100755
--- a/layerindex/update.py
+++ b/layerindex/update.py
@@ -345,10 +345,10 @@ def main():
repo = git.Repo(repodir)
assert repo.bare == False
try:
+ # Always get origin/branchname, so it raises error when branch doesn't exist when nocheckout
+ topcommit = repo.commit('origin/%s' % branchname)
if options.nocheckout:
topcommit = repo.commit('HEAD')
- else:
- topcommit = repo.commit('origin/%s' % branchname)
except:
if newbranch:
logger.info("Skipping update of layer %s - branch %s doesn't exist" % (layer.name, branchdesc))