-
-
Notifications
You must be signed in to change notification settings - Fork 933
Support GIT_OBJECT_DIRECTORY environment variable #1000
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
…subdirectory This will work for default git object databases only, which use git as object database directly. Related to #1000
Thanks a lot! You are probably right - the fix won't work in all cases, especially since GitPython has an optional pure-python object database implementation which certainly doesn't pick that up. However, I believe it's worth having this fix to improve the situation in the most common case. It looks like the patch fails on CI, but due to travis not being accessible from my current location, I don't really see what it is. Will keep you posted. |
Great, I moved the project to github actions, and now the patch is included. |
When using GIT_OBJECT_DIRECTORY to store git objects, a statement like
git.Repo('someproject') fails. This is due to is_git_dir() in git/repo/fun.py making an assumption that there will be a objects directory under .git which isn't the case when GIT_OBJECT_DIRECTORY is defined and being used.
A fix like the attached patch should solve the problem, though there might be more fixes needed in other places. This fix alone solves my particular workflow for now.
The text was updated successfully, but these errors were encountered: