summaryrefslogtreecommitdiff
path: root/morphlib/plugins/certify_plugin.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2016-03-03 10:35:52 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2016-03-03 15:31:49 +0000
commite8a67a7d12d2defbf975d707e7513837403d93a2 (patch)
tree376919bf85989db6a44d3377582d6419e889a864 /morphlib/plugins/certify_plugin.py
parentbb139ecf1b9de3b221ff1d93c26190a8623d5d33 (diff)
downloadmorph-e8a67a7d12d2defbf975d707e7513837403d93a2.tar.gz
Hide get_repo() and cache_repo() functions, always use get_updated_repo()
This allows us to simplify a couple of places. I cannot think of a single situation where'd you want to get the cached copy of a repo, but not update it. Think about it -- the repo might be *years* behind the upstream remote. Change-Id: I60340c7fb33e7bfe871ad30c0a9322a7202548e2
Diffstat (limited to 'morphlib/plugins/certify_plugin.py')
-rw-r--r--morphlib/plugins/certify_plugin.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/morphlib/plugins/certify_plugin.py b/morphlib/plugins/certify_plugin.py
index 8228be4d..735d0332 100644
--- a/morphlib/plugins/certify_plugin.py
+++ b/morphlib/plugins/certify_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015 Codethink Limited
+# Copyright (C) 2014-2016 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -115,11 +115,7 @@ class CertifyPlugin(cliapp.Plugin):
.format(name, ref))
certified = False
- # Ensure we have a cache of the repo
- if not self.lrc.has_repo(source.repo_name):
- self.lrc.cache_repo(source.repo_name)
-
- cached = self.lrc.get_repo(source.repo_name)
+ cached = self.lrc.get_updated_repo(source.repo_name, ref)
# Test that sha1 ref is anchored in a tag or branch,
# and thus not a candidate for removal on `git gc`.