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

Commitbd2b930

Browse files
committed
Preserve quoted leading and trailing single-line whitespace
At least in a single line, whitespace in a double-quoted value in aconfiguration file, like `name = " abc def "`, would presumably beintended. This removes the `strip()` call that is applied to text`ConfigParser` obtained by removing the double quotes around it.This slightly refines the changes in#2035 by dropping the `strip()`call while continuing to remove opening and closing double quotes.
1 parent5f30320 commitbd2b930

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
@@ -509,7 +509,7 @@ def string_decode(v: str) -> str:
509509
is_multi_line=True
510510
optval=string_decode(optval[1:])
511511
eliflen(optval)>1andoptval[0]=='"'andoptval[-1]=='"':
512-
optval=optval[1:-1].strip()
512+
optval=optval[1:-1]
513513
# END handle multi-line
514514
# Preserves multiple values for duplicate optnames.
515515
cursect.add(optname,optval)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp