From 366ad214b82cadc32920b371f7f99f3f6894ec6f Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 19 May 2009 12:47:37 -0700 Subject: Teach GitConfig how to yield subsection names This can be useful when pulling apart a configuration file, like finding all entries which match submodule.*.*. Signed-off-by: Shawn O. Pearce --- git_config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git_config.py b/git_config.py index 6ea505f9..bc7ed459 100644 --- a/git_config.py +++ b/git_config.py @@ -172,6 +172,11 @@ class GitConfig(object): self._branches[b.name] = b return b + def GetSubSections(self, section): + """List all subsection names matching $section.*.* + """ + return self._sections.get(section, set()) + def HasSection(self, section, subsection = ''): """Does at least one key in section.subsection exist? """ -- cgit v1.2.3-54-g00ecf