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

Function TestGetCommitRangeFiles_NoChanges

vcs/git/git_diff_test.go:647–661  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

645}
646
647func TestGetCommitRangeFiles_NoChanges(t *testing.T) {
648 tmpDir := t.TempDir()
649 setupGitRepo(t, tmpDir)
650
651 createFile(t, tmpDir, "test.txt", "content")
652 gitAdd(t, tmpDir, "test.txt")
653 commit := gitCommitAndGetSHA(t, tmpDir, "Commit")
654
655 // Same commit for from and to
656 files, err := GetCommitRangeFiles(tmpDir, commit, commit)
657
658 require.NoError(t, err)
659 g := testhelpers.TextGoldie(t)
660 g.Assert(t, t.Name(), []byte(normalizeFilePaths(tmpDir, files)))
661}
662
663func TestGetCommitRangeFiles_InvalidFromCommit(t *testing.T) {
664 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 8

TextGoldieFunction · 0.92
setupGitRepoFunction · 0.85
createFileFunction · 0.85
gitAddFunction · 0.85
gitCommitAndGetSHAFunction · 0.85
GetCommitRangeFilesFunction · 0.85
normalizeFilePathsFunction · 0.85
NameMethod · 0.65

Tested by

no test coverage detected