line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#include "proxy.h" |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#include "git2/proxy.h" |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
int git_proxy_options_init(git_proxy_options *opts, unsigned int version) |
13
|
|
|
|
|
|
|
{ |
14
|
0
|
0
|
|
|
|
|
GIT_INIT_STRUCTURE_FROM_TEMPLATE( |
15
|
|
|
|
|
|
|
opts, version, git_proxy_options, GIT_PROXY_OPTIONS_INIT); |
16
|
0
|
|
|
|
|
|
return 0; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
int git_proxy_init_options(git_proxy_options *opts, unsigned int version) |
20
|
|
|
|
|
|
|
{ |
21
|
0
|
|
|
|
|
|
return git_proxy_options_init(opts, version); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
int git_proxy_options_dup(git_proxy_options *tgt, const git_proxy_options *src) |
25
|
|
|
|
|
|
|
{ |
26
|
0
|
0
|
|
|
|
|
if (!src) { |
27
|
0
|
|
|
|
|
|
git_proxy_options_init(tgt, GIT_PROXY_OPTIONS_VERSION); |
28
|
0
|
|
|
|
|
|
return 0; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
memcpy(tgt, src, sizeof(git_proxy_options)); |
32
|
0
|
0
|
|
|
|
|
if (src->url) { |
33
|
0
|
|
|
|
|
|
tgt->url = git__strdup(src->url); |
34
|
0
|
0
|
|
|
|
|
GIT_ERROR_CHECK_ALLOC(tgt->url); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return 0; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
void git_proxy_options_clear(git_proxy_options *opts) |
41
|
|
|
|
|
|
|
{ |
42
|
0
|
|
|
|
|
|
git__free((char *) opts->url); |
43
|
0
|
|
|
|
|
|
opts->url = NULL; |
44
|
0
|
|
|
|
|
|
} |