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

Function TestHasUncommittedChanges_Clean

vcs/git/git_test.go:206–218  ·  view source on GitHub ↗

Tests for HasUncommittedChanges

(t *testing.T)

Source from the content-addressed store, hash-verified

204// Tests for HasUncommittedChanges
205
206func TestHasUncommittedChanges_Clean(t *testing.T) {
207 tmpDir := t.TempDir()
208 setupGitRepo(t, tmpDir)
209
210 createFile(t, tmpDir, "test.txt", "content")
211 gitAdd(t, tmpDir, "test.txt")
212 gitCommit(t, tmpDir, "Initial commit")
213
214 hasChanges, err := HasUncommittedChanges(tmpDir)
215
216 require.NoError(t, err)
217 assert.False(t, hasChanges)
218}
219
220func TestHasUncommittedChanges_UntrackedFile(t *testing.T) {
221 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 5

setupGitRepoFunction · 0.85
createFileFunction · 0.85
gitAddFunction · 0.85
gitCommitFunction · 0.85
HasUncommittedChangesFunction · 0.85

Tested by

no test coverage detected