summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-04-19 15:34:12 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-04-22 14:32:19 +0200
commit2efd7df6b11e8c646d05870965bb4588d6b6d425 (patch)
tree3c495b11f1515f7e91af853cf5641746de093e4c /include/git2/remote.h
parentdac95e4aa33a21c2180566558726e1a3d5c0399a (diff)
downloadlibgit2-2efd7df6b11e8c646d05870965bb4588d6b6d425.tar.gz
remote: provide read access to the callback structure
This should make it easier for bindings to dynamically override their own callbacks.
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index d57321f03..578fcf51b 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -520,6 +520,17 @@ GIT_EXTERN(int) git_remote_init_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.
*/
GIT_EXTERN(const git_transfer_progress *) git_remote_stats(git_remote *remote);