From c474c9cba1a8fbe09c219cc588d9ed334d31cd1e Mon Sep 17 00:00:00 2001 From: Jack Neus Date: Mon, 26 Jul 2021 23:08:54 +0000 Subject: repo: Add support for standalone manifests Added --standalone_manifest to repo tool. If set, the manifest is downloaded directly from the appropriate source (currently, we only support GS) and used instead of creating a manifest git checkout. The manifests.git repo is still created to keep track of various config but is marked as being for a standalone manifest so that the repo tool doesn't try to run networked git commands in it. BUG=b:192664812 TEST=existing tests (no coverage), manual runs Change-Id: I84378cbc7f8e515eabeccdde9665efc8cd2a9d21 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/312942 Tested-by: Jack Neus Reviewed-by: Mike Frysinger --- git_config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'git_config.py') diff --git a/git_config.py b/git_config.py index d882239b..778e81a4 100644 --- a/git_config.py +++ b/git_config.py @@ -104,6 +104,10 @@ class GitConfig(object): os.path.dirname(self.file), '.repo_' + os.path.basename(self.file) + '.json') + def ClearCache(self): + """Clear the in-memory cache of config.""" + self._cache_dict = None + def Has(self, name, include_defaults=True): """Return true if this configuration file has the key. """ @@ -399,7 +403,7 @@ class GitConfig(object): if p.Wait() == 0: return p.stdout else: - GitError('git config %s: %s' % (str(args), p.stderr)) + raise GitError('git config %s: %s' % (str(args), p.stderr)) class RepoConfig(GitConfig): -- cgit v1.2.3-54-g00ecf