summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2016-02-20 14:11:28 +0000
committerBaserock Gerrit <gerrit@baserock.org>2016-02-23 12:43:01 +0000
commitefc8da324e7fa2a62bbfecc638eec89ee2afd5b2 (patch)
treed314bfb86c7903a08bb46a30f4674b6036cced2e /scripts
parent219fb93712a19e6a0efb93b45ce318e2a91ddb7f (diff)
downloaddefinitions-efc8da324e7fa2a62bbfecc638eec89ee2afd5b2.tar.gz
licensecheck.py: Update remote before checking out
Change-Id: I348df2dda3df3e6d85b6b601163972ca5085ae19
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/licensecheck.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/licensecheck.py b/scripts/licensecheck.py
index 4b489ea4..c5f72f07 100755
--- a/scripts/licensecheck.py
+++ b/scripts/licensecheck.py
@@ -102,6 +102,9 @@ def check_repo_if_needed(name, repo, ref, repos_dir, licenses_dir):
if os.path.isdir(clone_path):
sys.stderr.write("Updating repo '%s' ...\n" % repo_name)
with open(os.devnull, 'w') as devnull:
+ subprocess.check_call([
+ "git", "remote", "update", "origin", "--prune"],
+ stderr=devnull, stdout=devnull, cwd=clone_path)
subprocess.check_call(["git", "checkout", ref], stderr=devnull,
stdout=devnull, cwd=clone_path)
else: