mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 14:02:48 +00:00
repository: avoid opening the repository twice on reinit
The call to repo_init_reinit already takes care of opening the repository and giving us a git_repository object to give to the caller. There is no need to call git_repository_open again.
This commit is contained in:
parent
9fae82405d
commit
b3aa440641
@ -854,6 +854,7 @@ int git_repository_init(git_repository **repo_out, const char *path, unsigned is
|
||||
goto cleanup;
|
||||
|
||||
result = repo_init_config(repository_path.ptr, is_bare, is_reinit);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (repo_init_structure(repository_path.ptr, is_bare) < 0 ||
|
||||
|
Loading…
Reference in New Issue
Block a user