mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 13:52:17 +00:00
Added git_repository_new function
This commit is contained in:
parent
83cc70d9fe
commit
7cc3c92027
@ -136,6 +136,14 @@ GIT_EXTERN(int) git_repository_open_ext(
|
|||||||
*/
|
*/
|
||||||
GIT_EXTERN(int) git_repository_open_bare(git_repository **out, const char *bare_path);
|
GIT_EXTERN(int) git_repository_open_bare(git_repository **out, const char *bare_path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new repository with neither backends nor config object
|
||||||
|
*
|
||||||
|
* Note that this is only useful if you wish to associate the repository
|
||||||
|
* with a non-filesystem-backed object database and config store.
|
||||||
|
*/
|
||||||
|
GIT_EXTERN(int) git_repository_new(git_repository **out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free a previously allocated repository
|
* Free a previously allocated repository
|
||||||
*
|
*
|
||||||
|
@ -129,6 +129,12 @@ static git_repository *repository_alloc(void)
|
|||||||
return repo;
|
return repo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int git_repository_new(git_repository **out)
|
||||||
|
{
|
||||||
|
*out = repository_alloc();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int load_config_data(git_repository *repo)
|
static int load_config_data(git_repository *repo)
|
||||||
{
|
{
|
||||||
int is_bare;
|
int is_bare;
|
||||||
|
Loading…
Reference in New Issue
Block a user