is libgit2 automatically packing repositories

∥☆過路亽.° 提交于 2019-12-24 19:09:15

问题


I did not see a garbage collection command in LibGit2 so I was wondering if it is currently automatically packing files in a local repository.


回答1:


There is no automatic repacking. This is something which you absolutely never want the library to do. All objects start off as loose objects and remain that way until some tool decides it would like to do housekeeping.

Repacking (and gc operations in general) is 90% policy, which is not something that the library should be doing. Whatever tool wants to do its should choose an appropriate time to create a packfile out of them based on the specific knowledge of usage.



来源:https://stackoverflow.com/questions/20614878/is-libgit2-automatically-packing-repositories

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!