summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Retailleau <jeremy.retailleau@gmail.com>2020-09-02 13:57:06 -0700
committerJeremy Retailleau <jeremy.retailleau@gmail.com>2020-09-02 13:57:06 -0700
commit9766832e11cdd8afed16dfd2d64529c2ae9c3382 (patch)
tree95e8a254f342c2b025f4a728d02997fb87ddcce9
parentc16f584725a4cadafc6e113abef45f4ea52d03b3 (diff)
downloadgitpython-9766832e11cdd8afed16dfd2d64529c2ae9c3382.tar.gz
Update check method to find all includes
-rw-r--r--git/config.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/git/config.py b/git/config.py
index 4de050a5..e686dcd3 100644
--- a/git/config.py
+++ b/git/config.py
@@ -446,7 +446,10 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, obje
raise e
def _has_includes(self):
- return self._merge_includes and self.has_section('include')
+ return self._merge_includes and any(
+ section == 'include' or section.startswith('includeIf ')
+ for section in self.sections()
+ )
def read(self):
"""Reads the data stored in the files we have been initialized with. It will