git-p4: Clean up git-p4 submit's log message handling.
[gitweb.git] / builtin-init-db.c
index ff6e87777ae4c2a883db3836cb9acfee31a7281d..79eaf8d6edf18675897f6eed571289fce450526a 100644 (file)
@@ -120,9 +120,9 @@ static void copy_templates(const char *git_dir, int len, const char *template_di
                 */
                template_dir = DEFAULT_GIT_TEMPLATE_DIR;
                if (!is_absolute_path(template_dir)) {
-                       const char *exec_path = git_exec_path();
-                       template_dir = prefix_path(exec_path, strlen(exec_path),
-                                                  template_dir);
+                       struct strbuf d = STRBUF_INIT;
+                       strbuf_addf(&d, "%s/%s", git_exec_path(), template_dir);
+                       template_dir = strbuf_detach(&d, NULL);
                }
        }
        strcpy(template_path, template_dir);