* Apply 'check_fn' to each line of stdin, printing values that pass the check * to stdout. */
| 53 | * to stdout. |
| 54 | */ |
| 55 | static int check_submodule(check_fn_t check_fn) |
| 56 | { |
| 57 | struct strbuf buf = STRBUF_INIT; |
| 58 | while (strbuf_getline(&buf, stdin) != EOF) { |
| 59 | if (!check_fn(buf.buf)) |
| 60 | printf("%s\n", buf.buf); |
| 61 | } |
| 62 | strbuf_release(&buf); |
| 63 | return 0; |
| 64 | } |
| 65 | |
| 66 | static int cmd__submodule_check_name(int argc, const char **argv) |
| 67 | { |
no test coverage detected