blob: e70ba1f71b88b9fe7ed196a1ca2239796ad092f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_net_h__
#define INCLUDE_git_net_h__
#include "common.h"
#include "oid.h"
#include "types.h"
/**
* @file git2/net.h
* @brief Git networking declarations
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
#define GIT_DEFAULT_PORT "9418"
/*
* We need this because we need to know whether we should call
* git-upload-pack or git-receive-pack on the remote end when get_refs
* gets called.
*/
typedef enum {
GIT_DIRECTION_FETCH = 0,
GIT_DIRECTION_PUSH = 1
} git_direction;
/**
* Remote head description, given out on `ls` calls.
*/
struct git_remote_head {
int local; /* available locally */
git_oid oid;
git_oid loid;
char *name;
};
/**
* Callback for listing the remote heads
*/
typedef int (*git_headlist_cb)(git_remote_head *rhead, void *payload);
/** @} */
GIT_END_DECL
#endif
|