MCPcopy Create free account
hub / github.com/LegacyCodeHQ/clarity-cli / TestListWorktrees_PrimaryOnly

Function TestListWorktrees_PrimaryOnly

vcs/git/git_worktree_test.go:92–104  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

90}
91
92func TestListWorktrees_PrimaryOnly(t *testing.T) {
93 repo := t.TempDir()
94 setupGitRepo(t, repo)
95 seedInitialCommit(t, repo)
96
97 wts, err := ListWorktrees(repo)
98 require.NoError(t, err)
99 require.Len(t, wts, 1)
100
101 assert.True(t, wts[0].IsPrimary)
102 assert.Equal(t, resolveSymlinks(repo), resolveSymlinks(wts[0].Path))
103 assert.NotEmpty(t, wts[0].Head)
104}
105
106func TestListWorktrees_PrimaryAndLinked(t *testing.T) {
107 repo := t.TempDir()

Callers

nothing calls this directly

Calls 4

setupGitRepoFunction · 0.85
seedInitialCommitFunction · 0.85
ListWorktreesFunction · 0.85
resolveSymlinksFunction · 0.70

Tested by

no test coverage detected