Skip to content

Commit eb7fd75

Browse files
committed
Avoids env var warning when path contains $/%; fix gitpython-developers#832
1 parent 85cf7e8 commit eb7fd75

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: git/repo/base.py

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class Repo(object):
7777
re_whitespace = re.compile(r'\s+')
7878
re_hexsha_only = re.compile('^[0-9A-Fa-f]{40}$')
7979
re_hexsha_shortened = re.compile('^[0-9A-Fa-f]{4,40}$')
80+
re_envvars = re.compile(r'(\$(\{\s?)?[a-zA-Z_]\w*(\}\s?)?|%\s?[a-zA-Z_]\w*\s?%)')
8081
re_author_committer_start = re.compile(r'^(author|committer)')
8182
re_tab_full_line = re.compile(r'^\t(.*)$')
8283

0 commit comments

Comments
 (0)