| 887 | } diff_git_output_t; |
| 888 | |
| 889 | static void diff_git_capture(const char *line, void *ud) { |
| 890 | diff_git_output_t *output = ud; |
| 891 | size_t length = strlen(line); |
| 892 | if (length + 2 > sizeof(output->text) - output->length) { |
| 893 | output->overflow = true; |
| 894 | return; |
| 895 | } |
| 896 | memcpy(output->text + output->length, line, length); |
| 897 | output->length += length; |
| 898 | output->text[output->length++] = '\n'; |
| 899 | output->text[output->length] = '\0'; |
| 900 | output->hunks += strncmp(line, "@@ ", 3) == 0; |
| 901 | output->context_lines += line[0] == ' '; |
| 902 | } |
| 903 | |
| 904 | /* Split the production flags (literal, space-separated arguments) so this |
| 905 | * exercises the same pins without a shell or a second copy of their values. */ |
nothing calls this directly
no outgoing calls
no test coverage detected