| line |
true |
false |
branch |
|
29
|
1419 |
0 |
assert(out && str); |
|
|
0 |
1419 |
assert(out && str); |
|
31
|
0 |
1419 |
if (!length) |
|
34
|
0 |
1419 |
if (length > GIT_OID_HEXSZ) |
|
39
|
55411 |
1400 |
for (p = 0; p < length; p++) { |
|
41
|
19 |
55392 |
if (v < 0) |
|
44
|
27688 |
27704 |
out->id[p / 2] |= (unsigned char)(v << (p % 2 ? 0 : 4)); |
|
71
|
1 |
2655 |
if (!oid) { |
|
75
|
106 |
2549 |
if (n > GIT_OID_HEXSZ) { |
|
82
|
51799 |
2655 |
for (i = 0; i < max_i; i++) |
|
85
|
51 |
2604 |
if (n & 1) |
|
102
|
29963 |
1577 |
for (i = 1; i < sizeof(oid->id); i++) |
|
118
|
0 |
7 |
if (!str) |
|
126
|
1932 |
0 |
if (!out || n == 0) |
|
|
0 |
1932 |
if (!out || n == 0) |
|
129
|
0 |
1932 |
if (n > GIT_OID_HEXSZ + 1) |
|
147
|
0 |
586 |
if (buffer + (header_len + sha_len + 1) > buffer_end) |
|
150
|
268 |
318 |
if (memcmp(buffer, header, header_len) != 0) |
|
153
|
0 |
318 |
if (buffer[header_len + sha_len] != '\n') |
|
156
|
0 |
318 |
if (git_oid_fromstr(oid, buffer + header_len) < 0) |
|
201
|
0 |
0 |
if (len > GIT_OID_HEXSZ) |
|
204
|
0 |
0 |
while (len > 1) { |
|
205
|
0 |
0 |
if (*a != *b) |
|
212
|
0 |
0 |
if (len) |
|
213
|
0 |
0 |
if ((*a ^ *b) & 0xf0) |
|
225
|
0 |
0 |
for (a = oid_a->id; *str && (a - oid_a->id) < GIT_OID_RAWSZ; ++a) { |
|
|
0 |
0 |
for (a = oid_a->id; *str && (a - oid_a->id) < GIT_OID_RAWSZ; ++a) { |
|
226
|
0 |
0 |
if ((hexval = git__fromhex(*str++)) < 0) |
|
229
|
0 |
0 |
if (*str) { |
|
230
|
0 |
0 |
if ((hexval = git__fromhex(*str++)) < 0) |
|
234
|
0 |
0 |
if (*a != strval) |
|
243
|
0 |
0 |
return git_oid_strcmp(oid_a, str) == 0 ? 0 : -1; |
|
250
|
23761 |
1081 |
for (i = 0; i < GIT_OID_RAWSZ; ++i, ++a) |
|
251
|
2134 |
21627 |
if (*a != 0) |
|
277
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(self->nodes); |
|
279
|
0 |
0 |
if (new_size > self->size) { |
|
292
|
0 |
0 |
if (os->node_count >= os->size) { |
|
293
|
0 |
0 |
if (resize_trie(os, os->size * 2) < 0) |
|
299
|
0 |
0 |
if (os->node_count == SHRT_MAX) { |
|
317
|
0 |
0 |
assert((size_t)((int)min_length) == min_length); |
|
320
|
0 |
0 |
if (os == NULL) |
|
323
|
0 |
0 |
if (resize_trie(os, 16) < 0) { |
|
336
|
0 |
0 |
if (os == NULL) |
|
394
|
0 |
0 |
if (os->full) { |
|
399
|
0 |
0 |
if (text_oid == NULL) |
|
405
|
0 |
0 |
for (i = 0; i < GIT_OID_HEXSZ; ++i) { |
|
409
|
0 |
0 |
if (c == -1) { |
|
416
|
0 |
0 |
if (is_leaf) { |
|
423
|
0 |
0 |
if (node == NULL) { |
|
424
|
0 |
0 |
if (os->full) |
|
430
|
0 |
0 |
if (node->children[c] == 0) { |
|
431
|
0 |
0 |
if (push_leaf(os, idx, c, &text_oid[i + 1]) == NULL) { |
|
432
|
0 |
0 |
if (os->full) |
|
442
|
0 |
0 |
if (idx < 0) { |
|
448
|
0 |
0 |
if (++i > os->min_length) |