git-init-db: brown paper bag bugfix.
authorJunio C Hamano <junkio@cox.net>
Fri, 5 Aug 2005 04:43:43 +0000 (21:43 -0700)
committerJunio C Hamano <junkio@cox.net>
Fri, 5 Aug 2005 04:43:43 +0000 (21:43 -0700)
OK, I admit I am an idiot.  I ended up creating bunch of garbage
directories like .git/HEADbranch/ .git/HEADrefs/...

Signed-off-by: Junio C Hamano <junkio@cox.net>
init-db.c

index fcb55f6..3f53d6c 100644 (file)
--- a/init-db.c
+++ b/init-db.c
@@ -189,6 +189,7 @@ static void create_default_files(const char *git_dir)
                        exit(1);
                }
        }
+       path[len] = 0;
        copy_templates(path);
 }