line |
true |
false |
branch |
16
|
187 |
580 |
if (sig == NULL) |
34
|
200 |
0 |
return strchr(input, '<') != NULL || strchr(input, '>') != NULL; |
|
0 |
200 |
return strchr(input, '<') != NULL || strchr(input, '>') != NULL; |
39
|
2704 |
0 |
return c <= 32 || |
40
|
2704 |
0 |
c == '.' || |
41
|
2704 |
0 |
c == ',' || |
42
|
2704 |
0 |
c == ':' || |
43
|
2704 |
0 |
c == ';' || |
44
|
2704 |
0 |
c == '<' || |
45
|
2704 |
0 |
c == '>' || |
46
|
2704 |
0 |
c == '"' || |
47
|
2704 |
615 |
c == '\\' || |
|
0 |
2704 |
c == '\\' || |
53
|
1391 |
0 |
while (len && is_crud((unsigned char)ptr[0])) { |
|
39 |
1352 |
while (len && is_crud((unsigned char)ptr[0])) { |
57
|
1928 |
0 |
while (len && is_crud((unsigned char)ptr[len - 1])) { |
|
576 |
1352 |
while (len && is_crud((unsigned char)ptr[len - 1])) { |
68
|
100 |
0 |
assert(name && email); |
|
0 |
100 |
assert(name && email); |
79
|
0 |
100 |
GIT_ERROR_CHECK_ALLOC(p); |
82
|
0 |
100 |
GIT_ERROR_CHECK_ALLOC(p->name); |
84
|
0 |
100 |
GIT_ERROR_CHECK_ALLOC(p->email); |
86
|
100 |
0 |
if (p->name[0] == '\0' || p->email[0] == '\0') { |
|
0 |
100 |
if (p->name[0] == '\0' || p->email[0] == '\0') { |
93
|
0 |
100 |
p->when.sign = (offset < 0) ? '-' : '+'; |
103
|
0 |
91 |
if (source == NULL) |
107
|
0 |
91 |
GIT_ERROR_CHECK_ALLOC(signature); |
110
|
0 |
91 |
GIT_ERROR_CHECK_ALLOC(signature->name); |
113
|
0 |
91 |
GIT_ERROR_CHECK_ALLOC(signature->email); |
128
|
0 |
4 |
if (source == NULL) |
132
|
0 |
4 |
GIT_ERROR_CHECK_ALLOC(signature); |
135
|
0 |
4 |
GIT_ERROR_CHECK_ALLOC(signature->name); |
138
|
0 |
4 |
GIT_ERROR_CHECK_ALLOC(signature->email); |
173
|
0 |
88 |
if (git_signature_new(&sig, name, email, now, (int)offset) < 0) |
187
|
0 |
86 |
if ((error = git_repository_config_snapshot(&cfg, repo)) < 0) |
190
|
79 |
7 |
if (!(error = git_config_get_string(&user_name, cfg, "user.name")) && |
|
79 |
0 |
if (!(error = git_config_get_string(&user_name, cfg, "user.name")) && |
206
|
537 |
39 |
if (ender && |
|
0 |
537 |
if (ender && |
210
|
537 |
39 |
if (header) { |
213
|
537 |
0 |
if (buffer + header_len >= buffer_end || memcmp(buffer, header, header_len) != 0) |
|
0 |
537 |
if (buffer + header_len >= buffer_end || memcmp(buffer, header, header_len) != 0) |
222
|
576 |
0 |
if (!email_start || !email_end || email_end <= email_start) |
|
576 |
0 |
if (!email_start || !email_end || email_end <= email_start) |
|
0 |
576 |
if (!email_start || !email_end || email_end <= email_start) |
230
|
576 |
0 |
if (email_end + 2 < buffer_end) { |
234
|
0 |
576 |
if (git__strntol64(&sig->when.time, time_start, |
243
|
576 |
0 |
if (time_end + 1 < buffer_end) { |
249
|
576 |
0 |
if ((tz_start[0] != '-' && tz_start[0] != '+') || |
263
|
576 |
0 |
if (hours <= 14 && mins <= 59) { |
|
576 |
0 |
if (hours <= 14 && mins <= 59) { |
266
|
0 |
576 |
if (tz_start[0] == '-') |
282
|
0 |
0 |
assert(out && buf); |
|
0 |
0 |
assert(out && buf); |
287
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(sig); |
292
|
0 |
0 |
if (error) |
305
|
236 |
0 |
assert(buf && sig); |
|
0 |
236 |
assert(buf && sig); |
308
|
236 |
0 |
sign = (sig->when.offset < 0 || sig->when.sign == '-') ? '-' : '+'; |
|
0 |
236 |
sign = (sig->when.offset < 0 || sig->when.sign == '-') ? '-' : '+'; |
310
|
0 |
236 |
if (offset < 0) |
316
|
236 |
0 |
git_buf_printf(buf, "%s%s <%s> %u %c%02d%02d\n", |
323
|
0 |
0 |
assert(one && two); |
|
0 |
0 |
assert(one && two); |
326
|
0 |
0 |
git__strcmp(one->name, two->name) == 0 && |
327
|
0 |
0 |
git__strcmp(one->email, two->email) == 0 && |
328
|
0 |
0 |
one->when.time == two->when.time && |
329
|
0 |
0 |
one->when.offset == two->when.offset && |
|
0 |
0 |
one->when.offset == two->when.offset && |