You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decode Git-supported quoted value escapes directly instead of routing UTF-8 text through Python unicode_escape. This preserves newlines, quotes, backslashes, and non-ASCII text when an unrelated config update rewrites existing values.
Reject carriage returns and NULs at the shared writer sink so values parsed from existing files cannot place unsafe control characters into rewritten config files. Git itself does not accept \r as a config escape, so rejection is the compatible safe behavior.
Regression coverage rewrites representative quoted values, compares GitPython and git-config results, and verifies CR/NUL rejection. Validated with the complete config test module, Ruff, and mypy.
Behavior checked against Git cf5497b14c5a, particularly config.c parse_value(), which supports \n, \t, \b, \\, and \" and rejects unknown escapes.
0 commit comments