mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-04 17:13:25 +00:00
Fixed missing error check on call to git_remote_download in git_remote_fetch. Moved error check to statement following git_remote_disconnect so that the disconnect happens regardless of the result of the download call.
This commit is contained in:
parent
66d9e0461c
commit
06a8f5c3b2
@ -857,12 +857,15 @@ int git_remote_fetch(
|
||||
if ((error = git_remote_connect(remote, GIT_DIRECTION_FETCH)) != 0)
|
||||
return error;
|
||||
|
||||
if ((error = git_remote_download(remote)) != 0)
|
||||
return error;
|
||||
error = git_remote_download(remote);
|
||||
|
||||
/* We don't need to be connected anymore */
|
||||
git_remote_disconnect(remote);
|
||||
|
||||
/* If the download failed, return the error */
|
||||
if (error != 0)
|
||||
return error;
|
||||
|
||||
/* Default reflog message */
|
||||
if (reflog_message)
|
||||
git_buf_sets(&reflog_msg_buf, reflog_message);
|
||||
|
Loading…
Reference in New Issue
Block a user