Btw. in TGitCache we have a git_repository object open. It caches at least file handles to .pack files.