summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-10-02 14:04:44 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2013-10-02 14:04:44 +0200
commit0e0cf78773bea0d06298ba3bf981a3be839041df (patch)
tree4b879238df61eccc2f048fe51e10fce421967e26 /include/git2
parentffc97d51264f8af435ccf52d33a62a6925b174c9 (diff)
downloadlibgit2-0e0cf78773bea0d06298ba3bf981a3be839041df.tar.gz
clone: put the callbacks struct directly in the clone options
There's no need for this to be a pointer to somewhere else.
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/clone.h4
-rw-r--r--include/git2/remote.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/git2/clone.h b/include/git2/clone.h
index a341a413c..331cf92e7 100644
--- a/include/git2/clone.h
+++ b/include/git2/clone.h
@@ -49,7 +49,7 @@ typedef struct git_clone_options {
unsigned int version;
git_checkout_opts checkout_opts;
- git_remote_callbacks *remote_callbacks;
+ git_remote_callbacks remote_callbacks;
int bare;
int ignore_cert_errors;
@@ -58,7 +58,7 @@ typedef struct git_clone_options {
} git_clone_options;
#define GIT_CLONE_OPTIONS_VERSION 1
-#define GIT_CLONE_OPTIONS_INIT {GIT_CLONE_OPTIONS_VERSION, {GIT_CHECKOUT_OPTS_VERSION, GIT_CHECKOUT_SAFE_CREATE}}
+#define GIT_CLONE_OPTIONS_INIT {GIT_CLONE_OPTIONS_VERSION, {GIT_CHECKOUT_OPTS_VERSION, GIT_CHECKOUT_SAFE_CREATE}, GIT_REMOTE_CALLBACKS_INIT}
/**
* Clone a remote repository.
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 8145de180..9858634cc 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -457,7 +457,7 @@ struct git_remote_callbacks {
* @param callbacks a pointer to the user's callback settings
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_remote_set_callbacks(git_remote *remote, git_remote_callbacks *callbacks);
+GIT_EXTERN(int) git_remote_set_callbacks(git_remote *remote, const git_remote_callbacks *callbacks);
/**
* Get the statistics structure that is filled in by the fetch operation.