diff --git a/src/repository.c b/src/repository.c index a829161e8..2e267b72d 100644 --- a/src/repository.c +++ b/src/repository.c @@ -1262,7 +1262,7 @@ static int check_repositoryformatversion(git_config *config) return 0; } -static int repo_init_create_head(const char *git_dir, const char *ref_name) +int git_repository_create_head(const char *git_dir, const char *ref_name) { git_buf ref_path = GIT_BUF_INIT; git_filebuf ref = GIT_FILEBUF_INIT; @@ -1959,7 +1959,7 @@ int git_repository_init_ext( repo_path.ptr, wd, opts)) && !(error = repo_init_config( repo_path.ptr, wd, opts->flags, opts->mode))) - error = repo_init_create_head( + error = git_repository_create_head( repo_path.ptr, opts->initial_head); } if (error < 0) diff --git a/src/repository.h b/src/repository.h index de9ccb1e8..74e15e146 100644 --- a/src/repository.h +++ b/src/repository.h @@ -154,6 +154,7 @@ GIT_INLINE(git_attr_cache *) git_repository_attr_cache(git_repository *repo) } int git_repository_head_tree(git_tree **tree, git_repository *repo); +int git_repository_create_head(const char *git_dir, const char *ref_name); /* * Weak pointers to repository internals.