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

Function TestHasUncommittedChanges_UntrackedFile

vcs/git/git_test.go:220–235  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

218}
219
220func TestHasUncommittedChanges_UntrackedFile(t *testing.T) {
221 tmpDir := t.TempDir()
222 setupGitRepo(t, tmpDir)
223
224 createFile(t, tmpDir, "committed.txt", "content")
225 gitAdd(t, tmpDir, "committed.txt")
226 gitCommit(t, tmpDir, "Initial commit")
227
228 // Create untracked file
229 createFile(t, tmpDir, "untracked.txt", "new content")
230
231 hasChanges, err := HasUncommittedChanges(tmpDir)
232
233 require.NoError(t, err)
234 assert.True(t, hasChanges)
235}
236
237func TestHasUncommittedChanges_ModifiedFile(t *testing.T) {
238 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