(t *testing.T)
| 377 | } |
| 378 | |
| 379 | func TestIsAncestor_SameCommit(t *testing.T) { |
| 380 | tmpDir := t.TempDir() |
| 381 | setupGitRepo(t, tmpDir) |
| 382 | |
| 383 | createFile(t, tmpDir, "test.txt", "content") |
| 384 | gitAdd(t, tmpDir, "test.txt") |
| 385 | commit := gitCommitAndGetSHA(t, tmpDir, "Commit") |
| 386 | |
| 387 | // A commit is its own ancestor |
| 388 | result, err := isAncestor(tmpDir, commit, commit) |
| 389 | |
| 390 | require.NoError(t, err) |
| 391 | assert.True(t, result) |
| 392 | } |
| 393 | |
| 394 | // Tests for NormalizeCommitRange |
| 395 |
nothing calls this directly
no test coverage detected