Commit 3db1b15e by Edward Thomson

Merge pull request #2884 from libgit2/cmn/template-path

repository: parse init.templatedir as a path
parents bebd2017 cc36f424
......@@ -1265,7 +1265,8 @@ static int repo_init_structure(
if (opts->template_path)
tdir = opts->template_path;
else if ((error = git_config_open_default(&cfg)) >= 0) {
error = git_config_get_string(&tdir, cfg, "init.templatedir");
if (!git_config_get_path(&template_buf, cfg, "init.templatedir"))
tdir = template_buf.ptr;
giterr_clear();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment