Clones g_repo (A) into /work/repo (B) so both share the basename "repo" * and thus the derived project name — required for artifact bootstrap. */
| 881 | /* Clones g_repo (A) into <tmp>/work/repo (B) so both share the basename "repo" |
| 882 | * and thus the derived project name — required for artifact bootstrap. */ |
| 883 | static bool clone_to_b(char *repoB_out, size_t repoB_sz) { |
| 884 | char work[1024]; |
| 885 | snprintf(work, sizeof(work), "%s/work", g_tmpdir); |
| 886 | cbm_mkdir_p(work, 0755); |
| 887 | snprintf(repoB_out, repoB_sz, "%s/repo", work); |
| 888 | if (runf("git clone -q \"%s\" \"%s\"", g_repo, repoB_out) != 0) { |
| 889 | return false; |
| 890 | } |
| 891 | /* A clone does NOT inherit the source repo's local user config, and CI |
| 892 | * runners have no global identity -- `git commit` then exits 128. Set it |
| 893 | * on the clone the same way git_init() does for the source repo. */ |
| 894 | return runf("git -C \"%s\" config user.email t@t.com", repoB_out) == 0 && |
| 895 | runf("git -C \"%s\" config user.name t", repoB_out) == 0; |
| 896 | } |
| 897 | |
| 898 | TEST(artifact_export_marks_clean_basis) { |
| 899 | setup_artifact_test(); |
no test coverage detected