()
| 642 | } |
| 643 | |
| 644 | async function createLocalSubmoduleRepo(): Promise<string> { |
| 645 | const submoduleRepoPath = await fs.mkdtemp(path.join(os.tmpdir(), "mux-test-submodule-")); |
| 646 | await execAsync("git init -b main", { cwd: submoduleRepoPath }); |
| 647 | await execAsync( |
| 648 | `git config user.email "test@example.com" && git config user.name "Test User" && git config commit.gpgsign false`, |
| 649 | { cwd: submoduleRepoPath } |
| 650 | ); |
| 651 | await fs.writeFile(path.join(submoduleRepoPath, "README.md"), "# Test submodule\n"); |
| 652 | await execAsync("git add README.md", { cwd: submoduleRepoPath }); |
| 653 | await execAsync('git -c commit.gpgsign=false commit -m "Initial submodule commit"', { |
| 654 | cwd: submoduleRepoPath, |
| 655 | }); |
| 656 | return submoduleRepoPath; |
| 657 | } |
| 658 | |
| 659 | /** |
| 660 | * Cleanup temporary git repository with retry logic |
no test coverage detected