config: avoid a funny sentinel value "a^"

Introduce CONFIG_REGEX_NONE as a more explicit sentinel value to say
"we do not want to replace any existing entry" and use it in the
implementation of "git config --add".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2014-08-19 02:20:00 -04:00
committed by Junio C Hamano
parent c8466645ed
commit c1063be2a3
3 changed files with 21 additions and 7 deletions

View File

@ -1233,6 +1233,8 @@ extern int update_server_info(int);
#define CONFIG_INVALID_PATTERN 6
#define CONFIG_GENERIC_ERROR 7
#define CONFIG_REGEX_NONE ((void *)1)
struct git_config_source {
unsigned int use_stdin:1;
const char *file;