mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 14:02:57 +00:00
Introduce cl_git_sandbox_init_new()
cl_git_sandbox_init_new() will create a clar temp directory and initialize a new repository at that location.
This commit is contained in:
parent
253a05f76b
commit
1c4b5cee00
@ -197,6 +197,14 @@ git_repository *cl_git_sandbox_init(const char *sandbox)
|
||||
return _cl_repo;
|
||||
}
|
||||
|
||||
git_repository *cl_git_sandbox_init_new(const char *sandbox)
|
||||
{
|
||||
cl_git_pass(git_repository_init(&_cl_repo, sandbox, false));
|
||||
_cl_sandbox = sandbox;
|
||||
|
||||
return _cl_repo;
|
||||
}
|
||||
|
||||
git_repository *cl_git_sandbox_reopen(void)
|
||||
{
|
||||
if (_cl_repo) {
|
||||
|
@ -127,6 +127,7 @@ int cl_rename(const char *source, const char *dest);
|
||||
/* Git sandbox setup helpers */
|
||||
|
||||
git_repository *cl_git_sandbox_init(const char *sandbox);
|
||||
git_repository *cl_git_sandbox_init_new(const char *name);
|
||||
void cl_git_sandbox_cleanup(void);
|
||||
git_repository *cl_git_sandbox_reopen(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user