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

Function TestGetShortCommitHash_InvalidCommit

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

Source from the content-addressed store, hash-verified

189}
190
191func TestGetShortCommitHash_InvalidCommit(t *testing.T) {
192 tmpDir := t.TempDir()
193 setupGitRepo(t, tmpDir)
194
195 createFile(t, tmpDir, "test.txt", "content")
196 gitAdd(t, tmpDir, "test.txt")
197 gitCommit(t, tmpDir, "Initial commit")
198
199 _, err := GetShortCommitHash(tmpDir, "invalid-sha-that-does-not-exist")
200
201 assert.Error(t, err)
202}
203
204// Tests for HasUncommittedChanges
205

Callers

nothing calls this directly

Calls 5

setupGitRepoFunction · 0.85
createFileFunction · 0.85
gitAddFunction · 0.85
gitCommitFunction · 0.85
GetShortCommitHashFunction · 0.85

Tested by

no test coverage detected