initSyncTestRepo creates a fresh git repository on branch "trunk" with an isolated config and a configured identity, returning its directory.
(t *testing.T)
| 109 | // initSyncTestRepo creates a fresh git repository on branch "trunk" with an |
| 110 | // isolated config and a configured identity, returning its directory. |
| 111 | func initSyncTestRepo(t *testing.T) string { |
| 112 | t.Helper() |
| 113 | git.IsolateConfig(t) |
| 114 | repoDir := t.TempDir() |
| 115 | runGit(t, repoDir, "init", "--quiet", "--initial-branch=trunk") |
| 116 | runGit(t, repoDir, "config", "user.name", "Test User") |
| 117 | runGit(t, repoDir, "config", "user.email", "test@example.com") |
| 118 | return repoDir |
| 119 | } |
| 120 | |
| 121 | func TestExecuteLocalRepoSyncNonCurrentBranch(t *testing.T) { |
| 122 | t.Run("branch checked out in another worktree", func(t *testing.T) { |
no test coverage detected