Code

Merge branch 'sb/dashless'
[git.git] / builtin-init-db.c
index 53aff68881ca90d7f35d76f04c93439c2b8be1b7..38b4fcb6db547cf6b7a814db621e6f05b583c420 100644 (file)
@@ -115,18 +115,8 @@ static void copy_templates(const char *template_dir)
 
        if (!template_dir)
                template_dir = getenv(TEMPLATE_DIR_ENVIRONMENT);
-       if (!template_dir) {
-               /*
-                * if the hard-coded template is relative, it is
-                * interpreted relative to the exec_dir
-                */
-               template_dir = DEFAULT_GIT_TEMPLATE_DIR;
-               if (!is_absolute_path(template_dir)) {
-                       struct strbuf d = STRBUF_INIT;
-                       strbuf_addf(&d, "%s/%s", git_exec_path(), template_dir);
-                       template_dir = strbuf_detach(&d, NULL);
-               }
-       }
+       if (!template_dir)
+               template_dir = system_path(DEFAULT_GIT_TEMPLATE_DIR);
        strcpy(template_path, template_dir);
        template_len = strlen(template_path);
        if (template_path[template_len-1] != '/') {