| 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 "trace.h" |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#include "str.h" |
|
11
|
|
|
|
|
|
|
#include "runtime.h" |
|
12
|
|
|
|
|
|
|
#include "git2/trace.h" |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
struct git_trace_data git_trace__data = {0}; |
|
15
|
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
int git_trace_set(git_trace_level_t level, git_trace_cb callback) |
|
17
|
|
|
|
|
|
|
{ |
|
18
|
0
|
0
|
|
|
|
|
GIT_ASSERT_ARG(level == 0 || callback != NULL); |
|
|
|
0
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
git_trace__data.level = level; |
|
21
|
0
|
|
|
|
|
|
git_trace__data.callback = callback; |
|
22
|
0
|
|
|
|
|
|
GIT_MEMORY_BARRIER; |
|
23
|
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
return 0; |
|
25
|
|
|
|
|
|
|
} |