-
-
Notifications
You must be signed in to change notification settings - Fork 933
Exception on repo().active_branch.name #1479
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
Comments
This is intended behaviour, despite not being 'nice'. The exception is not just any exception, but it states exactly why there is no active branch:
At this point, there is no way to fix this property, but in case you would like to add a new one, like |
Hi @Byron, probably a fix in the documentation would help users as well. I was looking for an error in my code for a while until I noticed that it's not my fault. Thanks. |
Definitely, if exceptions are used to communicate errors they should be documented, and a PR for that is welcome as well. |
Setup
Running on
GitPython==3.1.27
MacOS monterey
,Python 3.10.5
Reproduce the bug
git checkout <commit>
-> leads to a detached HEADError log
visual proof
The text was updated successfully, but these errors were encountered: