init: having keywords without value is not a global error.
We may later add a new configuration variable in "init" section that takes a boolean value. Erroring out at the beginning of the config parser makes life harder for later enhancement. The existing configuration variable is parsed by git_config_pathname() that checks and rejects init.templatedir that is unset without this extra check. Remove it. Signed-off-by: Steven Drake <sdrake@xnet.co.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
d8a8488d56
commit
b02a17f2b7
@ -170,8 +170,6 @@ static void copy_templates(const char *template_dir)
|
|||||||
|
|
||||||
static int git_init_db_config(const char *k, const char *v, void *cb)
|
static int git_init_db_config(const char *k, const char *v, void *cb)
|
||||||
{
|
{
|
||||||
if (!v)
|
|
||||||
return config_error_nonbool(k);
|
|
||||||
if (!strcmp(k, "init.templatedir"))
|
if (!strcmp(k, "init.templatedir"))
|
||||||
return git_config_pathname(&init_db_template_dir, k, v);
|
return git_config_pathname(&init_db_template_dir, k, v);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user