mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 00:12:15 +00:00
Fixed internal push state not being cleared on download
git_remote_download() must also clear the internal push state resulting from a possible earlier push operation. Otherwise calling git_remote_update_tips() will execute the push version instead of the fetch version and among other things, tags won't be updated.
This commit is contained in:
parent
56065c0954
commit
c070ac64fd
@ -885,6 +885,11 @@ int git_remote_download(git_remote *remote, const git_strarray *refspecs)
|
|||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
|
if (remote->push) {
|
||||||
|
git_push_free(remote->push);
|
||||||
|
remote->push = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if ((error = git_fetch_negotiate(remote)) < 0)
|
if ((error = git_fetch_negotiate(remote)) < 0)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user