Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-25 10:21:19 +0300
committerJunio C Hamano <gitster@pobox.com>2021-05-25 10:21:20 +0300
commit5d5b1473453400224ebb126bf3947e0a3276bdf5 (patch)
treeaeae5eb3e79d29657fb5530c872f5c5ddac6e45e /builtin/init-db.c
parentd9929cbb08af52da43711b3bf4938bf9e489ebc8 (diff)
parenta185dd58ecc17f2ea16985d59c9bb7b09bec7775 (diff)
Merge branch 'mt/init-template-userpath-fix'
Regression fix. * mt/init-template-userpath-fix: init: fix bug regarding ~/ expansion in init.templateDir
Diffstat (limited to 'builtin/init-db.c')
-rw-r--r--builtin/init-db.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/init-db.c b/builtin/init-db.c
index c19b35f1e6..2167796ff2 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -212,8 +212,9 @@ static int create_default_files(const char *template_path,
* values (since we've just potentially changed what's available on
* disk).
*/
- git_config_get_value("init.templatedir", &init_template_dir);
+ git_config_get_pathname("init.templatedir", &init_template_dir);
copy_templates(template_path, init_template_dir);
+ free((char *)init_template_dir);
git_config_clear();
reset_shared_repository();
git_config(git_default_config, NULL);