Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitea5d365

Browse files
committed
Match any number of leading spaces in config values
The regex comments state that any number of leading tabs or spacesshould be allowed, however the regex was only catching zero or onespace. This allows multiple spaces.
1 parent35bceb1 commitea5d365

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎git/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class GitConfigParser(cp.RawConfigParser, object):
124124
#} END configuration
125125

126126
OPTCRE=re.compile(
127-
r'\s?(?P<option>[^:=\s][^:=]*)'# very permissive, incuding leading whitespace
127+
r'\s*(?P<option>[^:=\s][^:=]*)'# very permissive, incuding leading whitespace
128128
r'\s*(?P<vi>[:=])\s*'# any number of space/tab,
129129
# followed by separator
130130
# (either : or =), followed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp