mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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 <sop@google.com>
This commit is contained in:
parent
242b52690d
commit
366ad214b8
@ -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?
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user