Merge branch 'jc/reflog-expire' into maint
[gitweb.git] / builtin-init-db.c
index e23b8438c741651f48bbf529f89d0336cc718fed..c68a3b1e7409cb15879724d9acef1cecc97ab9fe 100644 (file)
@@ -127,6 +127,8 @@ static void copy_templates(const char *template_dir)
                        template_dir = strbuf_detach(&d, NULL);
                }
        }
+       if (!template_dir[0])
+               return;
        strcpy(template_path, template_dir);
        template_len = strlen(template_path);
        if (template_path[template_len-1] != '/') {