(t *testing.T)
| 161 | } |
| 162 | |
| 163 | func TestGetCommitTreeFiles_InvalidCommit(t *testing.T) { |
| 164 | tmpDir := t.TempDir() |
| 165 | setupGitRepo(t, tmpDir) |
| 166 | |
| 167 | createFile(t, tmpDir, "test.txt", "content") |
| 168 | gitAdd(t, tmpDir, "test.txt") |
| 169 | gitCommit(t, tmpDir, "Initial commit") |
| 170 | |
| 171 | _, err := GetCommitTreeFiles(tmpDir, "invalid-sha-that-does-not-exist") |
| 172 | |
| 173 | assert.Error(t, err) |
| 174 | assert.Contains(t, err.Error(), "invalid commit reference") |
| 175 | } |
| 176 | |
| 177 | func TestGetCommitTreeFiles_NotGitRepo(t *testing.T) { |
| 178 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected