diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2016-02-20 14:11:28 +0000 |
---|---|---|
committer | Baserock Gerrit <gerrit@baserock.org> | 2016-02-23 12:43:01 +0000 |
commit | efc8da324e7fa2a62bbfecc638eec89ee2afd5b2 (patch) | |
tree | d314bfb86c7903a08bb46a30f4674b6036cced2e /scripts/licensecheck.py | |
parent | 219fb93712a19e6a0efb93b45ce318e2a91ddb7f (diff) | |
download | definitions-efc8da324e7fa2a62bbfecc638eec89ee2afd5b2.tar.gz |
licensecheck.py: Update remote before checking out
Change-Id: I348df2dda3df3e6d85b6b601163972ca5085ae19
Diffstat (limited to 'scripts/licensecheck.py')
-rwxr-xr-x | scripts/licensecheck.py | 3 |
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: |