Skip to content

Commit 854b5c7

Browse files
committed
repository: expose repo_init_create_head
Expose the function `repo_init_create_head` as `git_repository_create_head`.
1 parent 4292837 commit 854b5c7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/repository.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ static int check_repositoryformatversion(git_config *config)
12621262
return 0;
12631263
}
12641264

1265-
static int repo_init_create_head(const char *git_dir, const char *ref_name)
1265+
int git_repository_create_head(const char *git_dir, const char *ref_name)
12661266
{
12671267
git_buf ref_path = GIT_BUF_INIT;
12681268
git_filebuf ref = GIT_FILEBUF_INIT;
@@ -1959,7 +1959,7 @@ int git_repository_init_ext(
19591959
repo_path.ptr, wd, opts)) &&
19601960
!(error = repo_init_config(
19611961
repo_path.ptr, wd, opts->flags, opts->mode)))
1962-
error = repo_init_create_head(
1962+
error = git_repository_create_head(
19631963
repo_path.ptr, opts->initial_head);
19641964
}
19651965
if (error < 0)

src/repository.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ GIT_INLINE(git_attr_cache *) git_repository_attr_cache(git_repository *repo)
154154
}
155155

156156
int git_repository_head_tree(git_tree **tree, git_repository *repo);
157+
int git_repository_create_head(const char *git_dir, const char *ref_name);
157158

158159
/*
159160
* Weak pointers to repository internals.

0 commit comments

Comments
 (0)