]> git.proxmox.com Git - libgit2.git/blob - src/libgit2/remote.h
New upstream version 1.5.0+ds
[libgit2.git] / src / libgit2 / remote.h
1 /*
2 * Copyright (C) the libgit2 contributors. All rights reserved.
3 *
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.
6 */
7 #ifndef INCLUDE_remote_h__
8 #define INCLUDE_remote_h__
9
10 #include "common.h"
11
12 #include "git2/remote.h"
13 #include "git2/transport.h"
14 #include "git2/sys/remote.h"
15 #include "git2/sys/transport.h"
16
17 #include "refspec.h"
18 #include "vector.h"
19 #include "net.h"
20
21 #define GIT_REMOTE_ORIGIN "origin"
22
23 struct git_remote {
24 char *name;
25 char *url;
26 char *pushurl;
27 git_vector refs;
28 git_vector refspecs;
29 git_vector active_refspecs;
30 git_vector passive_refspecs;
31 git_vector local_heads;
32 git_transport *transport;
33 git_repository *repo;
34 git_push *push;
35 git_indexer_progress stats;
36 unsigned int need_pack;
37 git_remote_autotag_option_t download_tags;
38 int prune_refs;
39 int passed_refspecs;
40 };
41
42 int git_remote__urlfordirection(git_str *url_out, struct git_remote *remote, int direction, const git_remote_callbacks *callbacks);
43 int git_remote__http_proxy(char **out, git_remote *remote, git_net_url *url);
44
45 git_refspec *git_remote__matching_refspec(git_remote *remote, const char *refname);
46 git_refspec *git_remote__matching_dst_refspec(git_remote *remote, const char *refname);
47
48 int git_remote__default_branch(git_str *out, git_remote *remote);
49
50 int git_remote_connect_options_dup(
51 git_remote_connect_options *dst,
52 const git_remote_connect_options *src);
53 int git_remote_connect_options_normalize(
54 git_remote_connect_options *dst,
55 git_repository *repo,
56 const git_remote_connect_options *src);
57
58 int git_remote_capabilities(unsigned int *out, git_remote *remote);
59
60 #endif