2 * Copyright (C) the libgit2 contributors. All rights reserved.
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_remote_h__
8 #define INCLUDE_remote_h__
12 #include "git2/remote.h"
13 #include "git2/transport.h"
14 #include "git2/sys/transport.h"
20 #define GIT_REMOTE_ORIGIN "origin"
28 git_vector active_refspecs
;
29 git_vector passive_refspecs
;
30 git_transport
*transport
;
33 git_indexer_progress stats
;
34 unsigned int need_pack
;
35 git_remote_autotag_option_t download_tags
;
40 typedef struct git_remote_connection_opts
{
41 const git_strarray
*custom_headers
;
42 const git_proxy_options
*proxy
;
43 } git_remote_connection_opts
;
45 #define GIT_REMOTE_CONNECTION_OPTIONS_INIT { NULL, NULL }
47 int git_remote__connect(git_remote
*remote
, git_direction direction
, const git_remote_callbacks
*callbacks
, const git_remote_connection_opts
*conn
);
49 int git_remote__urlfordirection(git_buf
*url_out
, struct git_remote
*remote
, int direction
, const git_remote_callbacks
*callbacks
);
50 int git_remote__http_proxy(char **out
, git_remote
*remote
, git_net_url
*url
);
52 git_refspec
*git_remote__matching_refspec(git_remote
*remote
, const char *refname
);
53 git_refspec
*git_remote__matching_dst_refspec(git_remote
*remote
, const char *refname
);