X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-init-db.c;h=235a0ee48f2c5ce09c63a949358eb16cde05332d;hb=9b8dc263e1b0d470cc67a824837d8884ae3e7136;hp=c3ed1ce4929472b4e3fb7577ac61bd914baf0954;hpb=b0ed9eafb35b2330d5a96be79307f0e65547febb;p=git.git diff --git a/builtin-init-db.c b/builtin-init-db.c index c3ed1ce49..235a0ee48 100644 --- a/builtin-init-db.c +++ b/builtin-init-db.c @@ -218,8 +218,8 @@ static void create_default_files(const char *git_dir, const char *template_path) * branch, if it does not exist yet. */ strcpy(path + len, "HEAD"); - if (read_ref(path, sha1) < 0) { - if (create_symref(path, "refs/heads/master") < 0) + if (read_ref("HEAD", sha1) < 0) { + if (create_symref("HEAD", "refs/heads/master") < 0) exit(1); }