remote.h 1.12 KB
Newer Older
Vicent Marti committed
1
/*
Edward Thomson committed
2
 * Copyright (C) the libgit2 contributors. All rights reserved.
Vicent Marti committed
3 4 5 6
 *
 * This file is part of libgit2, distributed under the GNU GPL v2 with
 * a Linking Exception. For full terms see the included COPYING file.
 */
Carlos Martín Nieto committed
7 8 9
#ifndef INCLUDE_remote_h__
#define INCLUDE_remote_h__

10
#include "git2/remote.h"
11
#include "git2/transport.h"
12
#include "git2/sys/transport.h"
13

Carlos Martín Nieto committed
14
#include "refspec.h"
15
#include "vector.h"
Carlos Martín Nieto committed
16

17 18
#define GIT_REMOTE_ORIGIN "origin"

Carlos Martín Nieto committed
19 20 21
struct git_remote {
	char *name;
	char *url;
22
	char *pushurl;
23
	git_vector refs;
24
	git_vector refspecs;
25
	git_vector active_refspecs;
26
	git_vector passive_refspecs;
27
	git_transport *transport;
28
	git_repository *repo;
29
	git_push *push;
30
	git_transfer_progress stats;
Ben Straub committed
31 32
	unsigned int need_pack;
	git_remote_autotag_option_t download_tags;
33
	int prune_refs;
34
	int passed_refspecs;
Carlos Martín Nieto committed
35 36
};

37
const char* git_remote__urlfordirection(struct git_remote *remote, int direction);
38
int git_remote__get_http_proxy(git_remote *remote, bool use_ssl, char **proxy_url);
39

40 41 42
git_refspec *git_remote__matching_refspec(git_remote *remote, const char *refname);
git_refspec *git_remote__matching_dst_refspec(git_remote *remote, const char *refname);

Carlos Martín Nieto committed
43
#endif