| 318 | } |
| 319 | |
| 320 | static bool gf_contains(cbm_git_bytes_t bytes, const char *needle) { |
| 321 | size_t length = strlen(needle); |
| 322 | if (!bytes.data || length > bytes.length) |
| 323 | return false; |
| 324 | for (size_t i = 0; i <= bytes.length - length; i++) { |
| 325 | if (memcmp(bytes.data + i, needle, length) == 0) |
| 326 | return true; |
| 327 | } |
| 328 | return false; |
| 329 | } |
| 330 | |
| 331 | static bool gf_blob_cleared(const cbm_git_blob_t *blob) { |
| 332 | return !blob->bytes.data && blob->bytes.length == 0 && blob->oid[0] == '\0' && blob->mode == 0; |
no outgoing calls
no test coverage detected