-
-
Notifications
You must be signed in to change notification settings - Fork 935
File handles left open #287
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
Thank you. Which Python version are you using? |
This is on Python 2.7.6 |
I didn't reproduce it yet, but can imagine this truly is the case. What happens if you delete your repo instance, e.g. with If in any of the tests above the handles remain opened, this is indeed a critical and possibly easily reproducible bug. |
I've explored those but no progress. Thanks for looking into this. |
Apparently I was wrong about the To use it, just instantiate your import git
r = git.Repo(odbt=git.GitCmdObjectDB)
r.commit().message
# now lsof shows some pack files
del r
# now they are gone It's a bit sad that there seems to be no way to trigger this kind of resource release in the pure-python implementation, and considering that GitPython is in maintenance mode, I believe this is not going to improve. Please let me know if the suggested workaround did indeed work for you. |
This worked from the command prompt. I'll try it in the app a bit later. Thank you. |
Great to hear ! Feel free to close this issue if it worked in the app as well. |
You can watch the development stream on youtube.
|
It's working in the larger context as well - thank you again for tracking this down and providing a workaround. (And thanks for capturing the process in the video.) |
Hello,
It seems that as soon as I access any of the fields within
r.head.commit
, a set of file handles open and they don't close until the parent process exits. Specifically for me, this prevents me from unmounting a file system.Here's an example of what I'm doing:
As soon as a
commit
object field is accessed, the following happens on the file system:If there's a way around this, I'd appreciate some advice.
Thanks.
This is on Ubuntu 14.04 with GitPython 1.0.1 and git 1.9.1.
The text was updated successfully, but these errors were encountered: