From efc8da324e7fa2a62bbfecc638eec89ee2afd5b2 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Sat, 20 Feb 2016 14:11:28 +0000 Subject: licensecheck.py: Update remote before checking out Change-Id: I348df2dda3df3e6d85b6b601163972ca5085ae19 --- scripts/licensecheck.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') 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: -- cgit v1.2.1