(t *testing.T)
| 189 | } |
| 190 | |
| 191 | func 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 |
nothing calls this directly
no test coverage detected