summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-05-07 12:57:56 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2016-04-19 13:54:19 +0200
commit07bd3e57d9a9930727695be690c8757f79117d45 (patch)
tree487cd3795e1f0ae208d53889c9a90bbed9924d03 /include/git2/remote.h
parenta7bece2014ec043cfe58418dc13e982f79dcfcba (diff)
downloadlibgit2-07bd3e57d9a9930727695be690c8757f79117d45.tar.gz
proxy: ask the user for credentials if necessary
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 4f345d30c..c459f42cc 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -15,6 +15,7 @@
#include "strarray.h"
#include "transport.h"
#include "pack.h"
+#include "proxy.h"
/**
* @file git2/remote.h
@@ -241,10 +242,11 @@ GIT_EXTERN(const git_refspec *)git_remote_get_refspec(const git_remote *remote,
* @param direction GIT_DIRECTION_FETCH if you want to fetch or
* GIT_DIRECTION_PUSH if you want to push
* @param callbacks the callbacks to use for this connection
+ * @param proxy_opts proxy settings
* @param custom_headers extra HTTP headers to use in this connection
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks, const git_strarray *custom_headers);
+GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks, const git_proxy_options *proxy_opts, const git_strarray *custom_headers);
/**
* Get the remote repository's reference advertisement list
@@ -549,13 +551,19 @@ typedef struct {
git_remote_autotag_option_t download_tags;
/**
+ * Proxy options to use, by default no proxy is used.
+ */
+ git_proxy_options proxy_opts;
+
+ /**
* Extra headers for this fetch operation
*/
git_strarray custom_headers;
} git_fetch_options;
#define GIT_FETCH_OPTIONS_VERSION 1
-#define GIT_FETCH_OPTIONS_INIT { GIT_FETCH_OPTIONS_VERSION, GIT_REMOTE_CALLBACKS_INIT, GIT_FETCH_PRUNE_UNSPECIFIED, 1 }
+#define GIT_FETCH_OPTIONS_INIT { GIT_FETCH_OPTIONS_VERSION, GIT_REMOTE_CALLBACKS_INIT, GIT_FETCH_PRUNE_UNSPECIFIED, 1, \
+ GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, GIT_PROXY_OPTIONS_INIT }
/**
* Initializes a `git_fetch_options` with default values. Equivalent to
@@ -593,13 +601,18 @@ typedef struct {
git_remote_callbacks callbacks;
/**
+ * Proxy options to use, by default no proxy is used.
+ */
+ git_proxy_options proxy_opts;
+
+ /**
* Extra headers for this push operation
*/
git_strarray custom_headers;
} git_push_options;
#define GIT_PUSH_OPTIONS_VERSION 1
-#define GIT_PUSH_OPTIONS_INIT { GIT_PUSH_OPTIONS_VERSION, 0, GIT_REMOTE_CALLBACKS_INIT }
+#define GIT_PUSH_OPTIONS_INIT { GIT_PUSH_OPTIONS_VERSION, 0, GIT_REMOTE_CALLBACKS_INIT, GIT_PROXY_OPTIONS_INIT }
/**
* Initializes a `git_push_options` with default values. Equivalent to