Add "const" qualifier to "char *editor_program".
Also use "git_config_string" to simplify "config.c" code where "editor_program" is set. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
872da32d80
commit
ee9601e6be
8
config.c
8
config.c
@ -443,12 +443,8 @@ int git_default_config(const char *var, const char *value)
|
||||
if (!strcmp(var, "core.pager"))
|
||||
return git_config_string(&pager_program, var, value);
|
||||
|
||||
if (!strcmp(var, "core.editor")) {
|
||||
if (!value)
|
||||
return config_error_nonbool(var);
|
||||
editor_program = xstrdup(value);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(var, "core.editor"))
|
||||
return git_config_string(&editor_program, var, value);
|
||||
|
||||
if (!strcmp(var, "core.excludesfile")) {
|
||||
if (!value)
|
||||
|
||||
Reference in New Issue
Block a user