mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-04 07:15:20 +00:00
clone: don't overwrite original error message
This commit is contained in:
parent
f2f2d97f1e
commit
1df8ad01d7
@ -430,10 +430,15 @@ int git_clone(
|
||||
}
|
||||
|
||||
if (error != 0) {
|
||||
git_error_state last_error = {0};
|
||||
giterr_capture(&last_error, error);
|
||||
|
||||
git_repository_free(repo);
|
||||
repo = NULL;
|
||||
|
||||
(void)git_futils_rmdir_r(local_path, NULL, rmdir_flags);
|
||||
|
||||
giterr_restore(&last_error);
|
||||
}
|
||||
|
||||
*out = repo;
|
||||
|
Loading…
Reference in New Issue
Block a user