libgit2 / pygit2

Python bindings for libgit2
https://www.pygit2.org/
Other
1.59k stars 383 forks source link

repository: add .is_shallow to detect shallow clones #1058

Closed rcoup closed 3 years ago

rcoup commented 3 years ago

Add support for git_repository_is_shallow() to Pygit2 to indicate whether a repository is a shallow clone or not.

libgit2 currently doesn't support shallow clones beyond detecting there's a non-empty .git/shallow file but it's helpful nonetheless.