Skip to content

Commit c16f584

Browse files
committed
Add Regex to match content of "includeIf" section
1 parent 8f9840b commit c16f584

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

git/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
# represents the configuration level of a configuration file
3939
CONFIG_LEVELS = ("system", "user", "global", "repository")
4040

41+
# Section pattern to detect conditional includes.
42+
# https://git-scm.com/docs/git-config#_conditional_includes
43+
CONDITIONAL_INCLUDE_REGEXP = re.compile(r"(?<=includeIf )\"(gitdir|gitdir/i|onbranch):(.+)\"")
4144

4245
class MetaParserBuilder(abc.ABCMeta):
4346

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy