author | Bryan Donlan <bdonlan@fushizen.net> | |
Sun, 4 May 2008 05:37:52 +0000 (01:37 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 5 May 2008 21:17:00 +0000 (14:17 -0700) | ||
commit | e5c349ba112fc53832c757cef122297718d3a175 | |
tree | bfd7760127650321edd298cae96f8bc663141822 | tree | snapshot |
parent | 97b88dd58cad9d60427af9a956f90f7803f55db8 | commit | diff |
config.c: Escape backslashes in section names properly
If an element of the configuration key name other than the first or last
contains a backslash, it is not escaped on output, but is treated as an
escape sequence on input. Thus, the backslash is lost when re-loading
the configuration.
This patch corrects this by having backslashes escaped properly, and
introduces a new test for this bug.
Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If an element of the configuration key name other than the first or last
contains a backslash, it is not escaped on output, but is treated as an
escape sequence on input. Thus, the backslash is lost when re-loading
the configuration.
This patch corrects this by having backslashes escaped properly, and
introduces a new test for this bug.
Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c | diff | blob | history | |
t/t1303-wacky-config.sh | diff | blob | history |