Since this bug report 1.1.0 was released. The Changelog includes this note:
"Repositories with a large number of packfiles no longer exhaust the
number of file descriptors."

https://github.com/libgit2/libgit2/pull/5396

May or may not be related to this.