aboutsummaryrefslogtreecommitdiff
path: root/builtin/clone.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/clone.c')
-rw-r--r--builtin/clone.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index cd43bb5aa2..697c5bb5cb 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -1225,12 +1225,7 @@ int cmd_clone(int argc,
initialize_repository_version(GIT_HASH_UNKNOWN,
the_repository->ref_storage_format, 1);
- strbuf_addf(&buf, "%s/HEAD", git_dir);
- write_file(buf.buf, "ref: refs/heads/.invalid");
-
- strbuf_reset(&buf);
- strbuf_addf(&buf, "%s/refs", git_dir);
- safe_create_dir(the_repository, buf.buf, 1);
+ refs_create_refdir_stubs(the_repository, git_dir, NULL);
/*
* additional config can be injected with -c, make sure it's included