-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement] check if repository is shallow before other operations #2842
Comments
Great idea! If LibGit2Sharp exposes this information directly, that would be the best solution as we would like to avoid relying on the |
libgit2/libgit2#3058 |
However unfortunate, that does not come as a surprise. 😕 |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
As of May 9, 2023, LibGit2 supports shallow repositories. However, LibGit2Sharp is still blocking. |
btw this issue was automatically closed due to inactivity despite not having been resolved. |
Requires:
If a repository is shallow, halting and throwing a detailed exception would clarify the reason for the NullReferenceException reported in #2734
Detailed Description
Context
Throwing an informative exception message is more useful than an unhandled NullReferenceException.
Possible Implementation
GitVersion should query
git rev-parse --is-shallow-repository
(or test for ".git/shallow" file with very old Git clients) and then throw an exception if the operation returns "true".ref: https://stackoverflow.com/qestions/37531605/how-to-test-if-git-repository-is-shallow
The text was updated successfully, but these errors were encountered: