Skip to content

Remove explicit empty "" handling in ConfigParser #2047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove explicit empty "" handling in ConfigParser
Because literal `""` is a special case of `"..."` as parsed
since #2035.
  • Loading branch information
EliahKagan committed Jun 8, 2025
commit 2f225244286567b72c865fc7c0219c7dc043575f
3 changes: 0 additions & 3 deletions git/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,6 @@ def string_decode(v: str) -> str:
if pos != -1 and optval[pos - 1].isspace():
optval = optval[:pos]
optval = optval.strip()
if optval == '""':
optval = ""
# END handle empty string
optname = self.optionxform(optname.rstrip())
if len(optval) > 1 and optval[0] == '"' and optval[-1] != '"':
is_multi_line = True
Expand Down
Loading