mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 20:42:23 +00:00
repository: expose repo_init_create_head
Expose the function `repo_init_create_head` as `git_repository_create_head`.
This commit is contained in:
parent
4292837d50
commit
854b5c70e3
@ -1262,7 +1262,7 @@ static int check_repositoryformatversion(git_config *config)
|
|||||||
return 0;
|
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_buf ref_path = GIT_BUF_INIT;
|
||||||
git_filebuf ref = GIT_FILEBUF_INIT;
|
git_filebuf ref = GIT_FILEBUF_INIT;
|
||||||
@ -1959,7 +1959,7 @@ int git_repository_init_ext(
|
|||||||
repo_path.ptr, wd, opts)) &&
|
repo_path.ptr, wd, opts)) &&
|
||||||
!(error = repo_init_config(
|
!(error = repo_init_config(
|
||||||
repo_path.ptr, wd, opts->flags, opts->mode)))
|
repo_path.ptr, wd, opts->flags, opts->mode)))
|
||||||
error = repo_init_create_head(
|
error = git_repository_create_head(
|
||||||
repo_path.ptr, opts->initial_head);
|
repo_path.ptr, opts->initial_head);
|
||||||
}
|
}
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
|
@ -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_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.
|
* Weak pointers to repository internals.
|
||||||
|
Loading…
Reference in New Issue
Block a user