From 67e12286df04ef0eeec3aeaf6f224d2fe11751b7 Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Wed, 16 Dec 2020 17:12:45 +0000 Subject: [PATCH] Add validation after downloading cache from GS R=ehmaldonado@chromium.org, gavinmak@google.com Bug: 1159123 Change-Id: I21aedd9e0c557f75d8c11e055013cc4a540ea20c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2595787 Reviewed-by: Edward Lesmes Commit-Queue: Josip Sokcevic --- git_cache.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git_cache.py b/git_cache.py index c332520351..89f7f6d791 100755 --- a/git_cache.py +++ b/git_cache.py @@ -308,6 +308,8 @@ class Mirror(object): tempdir) if code: return False + # A quick validation that all references are valid. + self.RunGit(['for-each-ref'], cwd=tempdir) except Exception as e: self.print('Encountered error: %s' % str(e), file=sys.stderr) gclient_utils.rmtree(tempdir)