summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2011-02-14 16:55:53 -0700
committerJesse Keating <jkeating@redhat.com>2011-05-22 17:00:57 -0700
commitea5d365a93a98907a1d7c25d433efd06a854109e (patch)
treea9dfc0859608e882de90d8eb84015fb8a83449e5
parent35bceb16480b21c13a949eadff2aca0e2e5483fe (diff)
downloadgitpython-ea5d365a93a98907a1d7c25d433efd06a854109e.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.
-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