| 40 | } |
| 41 | |
| 42 | static bool git_validate_repo_path(const char *repo_path) { |
| 43 | if (!cbm_validate_shell_arg(repo_path)) { |
| 44 | return false; |
| 45 | } |
| 46 | #ifdef _WIN32 |
| 47 | for (const char *p = repo_path; *p; p++) { |
| 48 | if (*p == '%' || *p == '!' || *p == '^') { |
| 49 | return false; |
| 50 | } |
| 51 | } |
| 52 | #endif |
| 53 | return true; |
| 54 | } |
| 55 | |
| 56 | static int git_capture(const char *repo_path, const char *git_args, char **out) { |
| 57 | if (!out) { |
no test coverage detected