author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Mon, 10 Oct 2011 12:54:51 +0000 (14:54 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 10 Oct 2011 19:34:44 +0000 (12:34 -0700) | ||
commit | 008e3cc5d781273053c79d1ccf8cc3bf36086a07 | |
tree | f47a79e8b17ebded5e95b4e8ede837e2b917838d | tree | snapshot |
parent | 7ed863a85a6ce2c4ac4476848310b8f917ab41f9 | commit | diff |
config: display key_delim for config --bool --get-regexp
The previous logic in show_config was to print the delimiter when the
value was set, but Boolean variables have an implicit value "true" when
they appear with no value in the config file. As a result, we got:
git_Config --get-regexp '.*\.Boolean' #1. Ok: example.boolean
git_Config --bool --get-regexp '.*\.Boolean' #2. NO: example.booleantrue
Fix this by defering the display of the separator until after the value
to display has been computed.
Reported-by: Brian Foster <brian.foster@maxim-ic.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The previous logic in show_config was to print the delimiter when the
value was set, but Boolean variables have an implicit value "true" when
they appear with no value in the config file. As a result, we got:
git_Config --get-regexp '.*\.Boolean' #1. Ok: example.boolean
git_Config --bool --get-regexp '.*\.Boolean' #2. NO: example.booleantrue
Fix this by defering the display of the separator until after the value
to display has been computed.
Reported-by: Brian Foster <brian.foster@maxim-ic.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/config.c | diff | blob | history | |
t/t1300-repo-config.sh | diff | blob | history |