From 9766832e11cdd8afed16dfd2d64529c2ae9c3382 Mon Sep 17 00:00:00 2001 From: Jeremy Retailleau Date: Wed, 2 Sep 2020 13:57:06 -0700 Subject: Update check method to find all includes --- git/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git/config.py') 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 -- cgit v1.2.1