| 771 | } |
| 772 | |
| 773 | static int app_test_git(const char *root, const char *operation, const char *argument_one, |
| 774 | const char *argument_two) { |
| 775 | const char *git = "git"; |
| 776 | #ifdef _WIN32 |
| 777 | char git_executable[APP_TEST_PATH_CAP]; |
| 778 | const char *resolved = cbm_find_cli("git", cbm_get_home_dir()); |
| 779 | int resolved_length = |
| 780 | resolved ? snprintf(git_executable, sizeof(git_executable), "%s", resolved) : -1; |
| 781 | if (resolved_length <= 0 || (size_t)resolved_length >= sizeof(git_executable)) { |
| 782 | return -1; |
| 783 | } |
| 784 | git = git_executable; |
| 785 | #endif |
| 786 | const char *argv[] = {git, "-C", root, operation, argument_one, argument_two, NULL}; |
| 787 | cbm_proc_opts_t options = {0}; |
| 788 | cbm_proc_result_t result = {0}; |
| 789 | options.bin = git; |
| 790 | options.argv = argv; |
| 791 | options.quiet_timeout_ms = 10000; |
| 792 | return cbm_subprocess_run(&options, &result) == 0 && result.outcome == CBM_PROC_CLEAN ? 0 : -1; |
| 793 | } |
| 794 | |
| 795 | /* Rebase guard: restricted MCP profiles are a property of one authenticated |
| 796 | * daemon session. Before profile propagation, the daemon silently created a |
no test coverage detected