]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-init-db.c
Merge branch 'pb/gitweb-tagcloud' into pb/gitweb
[git.git] / builtin-init-db.c
index 38b4fcb6db547cf6b7a814db621e6f05b583c420..8140c1299afe368266de1153f3bb891f000fe5f5 100644 (file)
@@ -37,7 +37,7 @@ static void copy_templates_1(char *path, int baselen,
 
        /* Note: if ".git/hooks" file exists in the repository being
         * re-initialized, /etc/core-git/templates/hooks/update would
-        * cause git-init to fail here.  I think this is sane but
+        * cause "git init" to fail here.  I think this is sane but
         * it means that the set of templates we ship by default, along
         * with the way the namespace under .git/ is organized, should
         * be really carefully chosen.
@@ -117,6 +117,8 @@ static void copy_templates(const char *template_dir)
                template_dir = getenv(TEMPLATE_DIR_ENVIRONMENT);
        if (!template_dir)
                template_dir = system_path(DEFAULT_GIT_TEMPLATE_DIR);
+       if (!template_dir[0])
+               return;
        strcpy(template_path, template_dir);
        template_len = strlen(template_path);
        if (template_path[template_len-1] != '/') {