diff options
Diffstat (limited to 'src/remote.c')
-rw-r--r-- | src/remote.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/remote.c b/src/remote.c index 6f97d56a1..caefc686e 100644 --- a/src/remote.c +++ b/src/remote.c @@ -1731,3 +1731,15 @@ const git_refspec *git_remote_get_refspec(const git_remote *remote, size_t n) { return git_vector_get(&remote->refspecs, n); } + +int git_remote_init_callbacks(git_remote_callbacks* opts, int version) +{ + if (version != GIT_REMOTE_CALLBACKS_VERSION) { + giterr_set(GITERR_INVALID, "Invalid version %d for git_remote_callbacks", version); + return -1; + } else { + git_remote_callbacks o = GIT_REMOTE_CALLBACKS_INIT; + memcpy(opts, &o, sizeof(o)); + return 0; + } +} |