remote.h 1.14 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 11
#include "common.h"

12
#include "git2/remote.h"
13
#include "git2/transport.h"
14
#include "git2/sys/transport.h"
15

Carlos Martín Nieto committed
16
#include "refspec.h"
17
#include "vector.h"
Carlos Martín Nieto committed
18

19 20
#define GIT_REMOTE_ORIGIN "origin"

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

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

42 43 44
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
45
#endif