mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 17:20:22 +00:00
repository: parse init.templatedir as a path
This is a path so we must use the path getter so we get the tilde expansion done.
This commit is contained in:
parent
bebd201737
commit
cc36f424d4
@ -1265,7 +1265,8 @@ static int repo_init_structure(
|
|||||||
if (opts->template_path)
|
if (opts->template_path)
|
||||||
tdir = opts->template_path;
|
tdir = opts->template_path;
|
||||||
else if ((error = git_config_open_default(&cfg)) >= 0) {
|
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();
|
giterr_clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user