瀏覽代碼

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 <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Josip Sokcevic 4 年之前
父節點
當前提交
67e12286df
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      git_cache.py

+ 2 - 0
git_cache.py

@@ -308,6 +308,8 @@ class Mirror(object):
                            tempdir)
                            tempdir)
       if code:
       if code:
         return False
         return False
+      # A quick validation that all references are valid.
+      self.RunGit(['for-each-ref'], cwd=tempdir)
     except Exception as e:
     except Exception as e:
       self.print('Encountered error: %s' % str(e), file=sys.stderr)
       self.print('Encountered error: %s' % str(e), file=sys.stderr)
       gclient_utils.rmtree(tempdir)
       gclient_utils.rmtree(tempdir)