(t *testing.T)
| 218 | } |
| 219 | |
| 220 | func TestHasUncommittedChanges_UntrackedFile(t *testing.T) { |
| 221 | tmpDir := t.TempDir() |
| 222 | setupGitRepo(t, tmpDir) |
| 223 | |
| 224 | createFile(t, tmpDir, "committed.txt", "content") |
| 225 | gitAdd(t, tmpDir, "committed.txt") |
| 226 | gitCommit(t, tmpDir, "Initial commit") |
| 227 | |
| 228 | // Create untracked file |
| 229 | createFile(t, tmpDir, "untracked.txt", "new content") |
| 230 | |
| 231 | hasChanges, err := HasUncommittedChanges(tmpDir) |
| 232 | |
| 233 | require.NoError(t, err) |
| 234 | assert.True(t, hasChanges) |
| 235 | } |
| 236 | |
| 237 | func TestHasUncommittedChanges_ModifiedFile(t *testing.T) { |
| 238 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected