mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-11 14:31:42 +00:00
remote: provide read access to the callback structure
This should make it easier for bindings to dynamically override their own callbacks.
This commit is contained in:
parent
dac95e4aa3
commit
2efd7df6b1
@ -519,6 +519,17 @@ GIT_EXTERN(int) git_remote_init_callbacks(
|
|||||||
*/
|
*/
|
||||||
GIT_EXTERN(int) git_remote_set_callbacks(git_remote *remote, const git_remote_callbacks *callbacks);
|
GIT_EXTERN(int) git_remote_set_callbacks(git_remote *remote, const git_remote_callbacks *callbacks);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the current callback structure
|
||||||
|
*
|
||||||
|
* This provides read access to the callbacks structure as the remote
|
||||||
|
* sees it.
|
||||||
|
*
|
||||||
|
* @param remote the remote to query
|
||||||
|
* @return a pointer to the callbacks structure
|
||||||
|
*/
|
||||||
|
GIT_EXTERN(const git_remote_callbacks *) git_remote_get_callbacks(git_remote *remote);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the statistics structure that is filled in by the fetch operation.
|
* Get the statistics structure that is filled in by the fetch operation.
|
||||||
*/
|
*/
|
||||||
|
@ -1253,6 +1253,13 @@ int git_remote_set_callbacks(git_remote *remote, const git_remote_callbacks *cal
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const git_remote_callbacks *git_remote_get_callbacks(git_remote *remote)
|
||||||
|
{
|
||||||
|
assert(remote);
|
||||||
|
|
||||||
|
return &remote->callbacks;
|
||||||
|
}
|
||||||
|
|
||||||
int git_remote_set_transport(git_remote *remote, git_transport *transport)
|
int git_remote_set_transport(git_remote *remote, git_transport *transport)
|
||||||
{
|
{
|
||||||
assert(remote && transport);
|
assert(remote && transport);
|
||||||
|
Loading…
Reference in New Issue
Block a user