Commit 40f1424
Add Commit.is_shallow property; document stats() limitation at shallow boundary (#2167)
Accessing .stats on a commit at the boundary of a shallow clone raises
GitCommandError because the commit's parent SHA was never fetched. This
adds an is_shallow property to detect this case ahead of time by checking
the repository's shallow file, and documents the limitation on stats().
Co-authored-by: Claude <noreply@anthropic.com>1 parent b920dcd commit 40f1424
2 files changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
377 | 382 | | |
378 | 383 | | |
379 | 384 | | |
| |||
0 commit comments