line |
true |
false |
branch |
25
|
0 |
0 |
if (one->is_merge && !two->is_merge) |
|
0 |
0 |
if (one->is_merge && !two->is_merge) |
27
|
0 |
0 |
if (two->is_merge && !one->is_merge) |
|
0 |
0 |
if (two->is_merge && !one->is_merge) |
30
|
0 |
0 |
if (one->ref_name && two->ref_name) |
|
0 |
0 |
if (one->ref_name && two->ref_name) |
32
|
0 |
0 |
else if (one->ref_name) |
34
|
0 |
0 |
else if (two->ref_name) |
46
|
0 |
0 |
if (git_net_url_parse(&url, remote_url) == 0) { |
53
|
0 |
0 |
if ((error = git_net_url_fmt(&buf, &url)) < 0) |
60
|
0 |
0 |
if (!sanitized) |
76
|
0 |
0 |
assert(out && oid); |
|
0 |
0 |
assert(out && oid); |
81
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(fetchhead_ref); |
88
|
0 |
0 |
if (ref_name) { |
90
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(fetchhead_ref->ref_name); |
93
|
0 |
0 |
if (remote_url) { |
95
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(fetchhead_ref->remote_url); |
111
|
0 |
0 |
assert(file && fetchhead_ref); |
|
0 |
0 |
assert(file && fetchhead_ref); |
116
|
0 |
0 |
if (git__prefixcmp(fetchhead_ref->ref_name, GIT_REFS_HEADS_DIR) == 0) { |
119
|
0 |
0 |
} else if(git__prefixcmp(fetchhead_ref->ref_name, |
123
|
0 |
0 |
} else if (!git__strcmp(fetchhead_ref->ref_name, GIT_HEAD_FILE)) { |
130
|
0 |
0 |
if (head) |
133
|
0 |
0 |
return git_filebuf_printf(file, "%s\t%s\t%s'%s' of %s\n", |
148
|
0 |
0 |
assert(repo && fetchhead_refs); |
|
0 |
0 |
assert(repo && fetchhead_refs); |
150
|
0 |
0 |
if (git_buf_joinpath(&path, repo->gitdir, GIT_FETCH_HEAD_FILE) < 0) |
153
|
0 |
0 |
if (git_filebuf_open(&file, path.ptr, GIT_FILEBUF_APPEND, GIT_REFS_FILE_MODE) < 0) { |
162
|
0 |
0 |
git_vector_foreach(fetchhead_refs, i, fetchhead_ref) |
182
|
0 |
0 |
if (!*line) { |
189
|
0 |
0 |
if ((oid_str = git__strsep(&line, "\t")) == NULL) { |
196
|
0 |
0 |
if (strlen(oid_str) != GIT_OID_HEXSZ) { |
202
|
0 |
0 |
if (git_oid_fromstr(oid, oid_str) < 0) { |
204
|
0 |
0 |
const char *err_msg = oid_err ? oid_err->message : "invalid object ID"; |
212
|
0 |
0 |
if (*line) { |
213
|
0 |
0 |
if ((is_merge_str = git__strsep(&line, "\t")) == NULL) { |
219
|
0 |
0 |
if (*is_merge_str == '\0') |
221
|
0 |
0 |
else if (strcmp(is_merge_str, "not-for-merge") == 0) |
229
|
0 |
0 |
if ((desc = line) == NULL) { |
235
|
0 |
0 |
if (git__prefixcmp(desc, "branch '") == 0) { |
238
|
0 |
0 |
} else if (git__prefixcmp(desc, "tag '") == 0) { |
241
|
0 |
0 |
} else if (git__prefixcmp(desc, "'") == 0) |
244
|
0 |
0 |
if (name) { |
261
|
0 |
0 |
if (type) |
263
|
0 |
0 |
else if(name) |
282
|
0 |
0 |
assert(repo && cb); |
|
0 |
0 |
assert(repo && cb); |
284
|
0 |
0 |
if (git_buf_joinpath(&path, repo->gitdir, GIT_FETCH_HEAD_FILE) < 0) |
287
|
0 |
0 |
if ((error = git_futils_readbuffer(&file, git_buf_cstr(&path))) < 0) |
292
|
0 |
0 |
while ((line = git__strsep(&buffer, "\n")) != NULL) { |
295
|
0 |
0 |
if ((error = fetchhead_ref_parse( |
299
|
0 |
0 |
if (git_buf_len(&name) > 0) |
305
|
0 |
0 |
if (error) { |
311
|
0 |
0 |
if (*buffer) { |
327
|
0 |
0 |
if (fetchhead_ref == NULL) |