diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2015-02-05 20:01:56 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-02-05 20:01:56 -0500 |
commit | 3db1b15e16c8501a74292855a9cb4be4c62dd929 (patch) | |
tree | 25374a211c80031255841baf3cd5df89f1ce6f62 | |
parent | bebd2017370294a468ed6cf02c9de35973a9e4f7 (diff) | |
parent | cc36f424d46f7c11ebff1dbf23df3be3d211c9b4 (diff) | |
download | libgit2-3db1b15e16c8501a74292855a9cb4be4c62dd929.tar.gz |
Merge pull request #2884 from libgit2/cmn/template-path
repository: parse init.templatedir as a path
-rw-r--r-- | src/repository.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/repository.c b/src/repository.c index 433754489..c9275078f 100644 --- a/src/repository.c +++ b/src/repository.c @@ -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(); } |