summaryrefslogtreecommitdiffstats
path: root/git_config.py
diff options
context:
space:
mode:
authorJack Neus <jackneus@google.com>2021-07-26 23:08:54 +0000
committerJack Neus <jackneus@google.com>2021-09-28 15:40:46 +0000
commitc474c9cba1a8fbe09c219cc588d9ed334d31cd1e (patch)
tree16cfecbac2dcd974c7971536bf2bda15d7296f66 /git_config.py
parent956f7363d100abe6c1f58b36d7aea59b9e41cd04 (diff)
downloadgit-repo-c474c9cba1a8fbe09c219cc588d9ed334d31cd1e.tar.gz
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 <jackneus@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'git_config.py')
-rw-r--r--git_config.py6
1 files changed, 5 insertions, 1 deletions
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):
104 os.path.dirname(self.file), 104 os.path.dirname(self.file),
105 '.repo_' + os.path.basename(self.file) + '.json') 105 '.repo_' + os.path.basename(self.file) + '.json')
106 106
107 def ClearCache(self):
108 """Clear the in-memory cache of config."""
109 self._cache_dict = None
110
107 def Has(self, name, include_defaults=True): 111 def Has(self, name, include_defaults=True):
108 """Return true if this configuration file has the key. 112 """Return true if this configuration file has the key.
109 """ 113 """
@@ -399,7 +403,7 @@ class GitConfig(object):
399 if p.Wait() == 0: 403 if p.Wait() == 0:
400 return p.stdout 404 return p.stdout
401 else: 405 else:
402 GitError('git config %s: %s' % (str(args), p.stderr)) 406 raise GitError('git config %s: %s' % (str(args), p.stderr))
403 407
404 408
405class RepoConfig(GitConfig): 409class RepoConfig(GitConfig):