(t *testing.T)
| 235 | } |
| 236 | |
| 237 | func TestHasUncommittedChanges_ModifiedFile(t *testing.T) { |
| 238 | tmpDir := t.TempDir() |
| 239 | setupGitRepo(t, tmpDir) |
| 240 | |
| 241 | filePath := createFile(t, tmpDir, "test.txt", "content") |
| 242 | gitAdd(t, tmpDir, "test.txt") |
| 243 | gitCommit(t, tmpDir, "Initial commit") |
| 244 | |
| 245 | // Modify the file |
| 246 | modifyFile(t, filePath) |
| 247 | |
| 248 | hasChanges, err := HasUncommittedChanges(tmpDir) |
| 249 | |
| 250 | require.NoError(t, err) |
| 251 | assert.True(t, hasChanges) |
| 252 | } |
| 253 | |
| 254 | func TestHasUncommittedChanges_StagedFile(t *testing.T) { |
| 255 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected