summaryrefslogtreecommitdiff
path: root/git/config.py
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2011-02-14 16:55:53 -0700
committerSebastian Thiel <byronimo@gmail.com>2011-06-07 19:13:20 +0200
commitecd0fd499205cde2da1bfd11d6050d26ce71671d (patch)
tree4c8a1fabf00d260921ad459e6d14f8a6613bdae3 /git/config.py
parent4786d195424e7e0efa13bd5e3c496005a9d8180c (diff)
downloadgitpython-ecd0fd499205cde2da1bfd11d6050d26ce71671d.tar.gz
Match any number of leading spaces in config values
The regex comments state that any number of leading tabs or spaces should be allowed, however the regex was only catching zero or one space. This allows multiple spaces.
Diffstat (limited to 'git/config.py')
-rw-r--r--git/config.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git/config.py b/git/config.py
index f1a8832e..209f2ffe 100644
--- a/git/config.py
+++ b/git/config.py
@@ -124,7 +124,7 @@ class GitConfigParser(cp.RawConfigParser, object):
#} END configuration
OPTCRE = re.compile(
- r'\s?(?P<option>[^:=\s][^:=]*)' # very permissive, incuding leading whitespace
+ r'\s*(?P<option>[^:=\s][^:=]*)' # very permissive, incuding leading whitespace
r'\s*(?P<vi>[:=])\s*' # any number of space/tab,
# followed by separator
# (either : or =), followed