|
15 | 15 | #include "strarray.h" |
16 | 16 | #include "transport.h" |
17 | 17 | #include "pack.h" |
| 18 | +#include "proxy.h" |
18 | 19 |
|
19 | 20 | /** |
20 | 21 | * @file git2/remote.h |
@@ -241,10 +242,11 @@ GIT_EXTERN(const git_refspec *)git_remote_get_refspec(const git_remote *remote, |
241 | 242 | * @param direction GIT_DIRECTION_FETCH if you want to fetch or |
242 | 243 | * GIT_DIRECTION_PUSH if you want to push |
243 | 244 | * @param callbacks the callbacks to use for this connection |
| 245 | + * @param proxy_opts proxy settings |
244 | 246 | * @param custom_headers extra HTTP headers to use in this connection |
245 | 247 | * @return 0 or an error code |
246 | 248 | */ |
247 | | -GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks, const git_strarray *custom_headers); |
| 249 | +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); |
248 | 250 |
|
249 | 251 | /** |
250 | 252 | * Get the remote repository's reference advertisement list |
@@ -548,14 +550,20 @@ typedef struct { |
548 | 550 | */ |
549 | 551 | git_remote_autotag_option_t download_tags; |
550 | 552 |
|
| 553 | + /** |
| 554 | + * Proxy options to use, by default no proxy is used. |
| 555 | + */ |
| 556 | + git_proxy_options proxy_opts; |
| 557 | + |
551 | 558 | /** |
552 | 559 | * Extra headers for this fetch operation |
553 | 560 | */ |
554 | 561 | git_strarray custom_headers; |
555 | 562 | } git_fetch_options; |
556 | 563 |
|
557 | 564 | #define GIT_FETCH_OPTIONS_VERSION 1 |
558 | | -#define GIT_FETCH_OPTIONS_INIT { GIT_FETCH_OPTIONS_VERSION, GIT_REMOTE_CALLBACKS_INIT, GIT_FETCH_PRUNE_UNSPECIFIED, 1 } |
| 565 | +#define GIT_FETCH_OPTIONS_INIT { GIT_FETCH_OPTIONS_VERSION, GIT_REMOTE_CALLBACKS_INIT, GIT_FETCH_PRUNE_UNSPECIFIED, 1, \ |
| 566 | + GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, GIT_PROXY_OPTIONS_INIT } |
559 | 567 |
|
560 | 568 | /** |
561 | 569 | * Initializes a `git_fetch_options` with default values. Equivalent to |
@@ -592,14 +600,19 @@ typedef struct { |
592 | 600 | */ |
593 | 601 | git_remote_callbacks callbacks; |
594 | 602 |
|
| 603 | + /** |
| 604 | + * Proxy options to use, by default no proxy is used. |
| 605 | + */ |
| 606 | + git_proxy_options proxy_opts; |
| 607 | + |
595 | 608 | /** |
596 | 609 | * Extra headers for this push operation |
597 | 610 | */ |
598 | 611 | git_strarray custom_headers; |
599 | 612 | } git_push_options; |
600 | 613 |
|
601 | 614 | #define GIT_PUSH_OPTIONS_VERSION 1 |
602 | | -#define GIT_PUSH_OPTIONS_INIT { GIT_PUSH_OPTIONS_VERSION, 0, GIT_REMOTE_CALLBACKS_INIT } |
| 615 | +#define GIT_PUSH_OPTIONS_INIT { GIT_PUSH_OPTIONS_VERSION, 0, GIT_REMOTE_CALLBACKS_INIT, GIT_PROXY_OPTIONS_INIT } |
603 | 616 |
|
604 | 617 | /** |
605 | 618 | * Initializes a `git_push_options` with default values. Equivalent to |
|
0 commit comments