FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add Regex to match content of "includeIf" section · shaneutt/GitPython@c16f584 · GitHub

Repository navigation

Commit c16f584

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

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎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)

Back | FazBrowse Home | New Git URL