]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/init-db.c
fetch: warn about forced updates in branch listing
[thirdparty/git.git] / builtin / init-db.c
index 6ca002893f47516ee8963db09d60b3716b60a205..944ec77fe1032775ff595f0b1eb99a1fb22d059f 100644 (file)
@@ -502,6 +502,9 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
        if (real_git_dir && !is_absolute_path(real_git_dir))
                real_git_dir = real_pathdup(real_git_dir, 1);
 
+       if (template_dir && *template_dir && !is_absolute_path(template_dir))
+               template_dir = absolute_pathdup(template_dir);
+
        if (argc == 1) {
                int mkdir_tried = 0;
        retry: