为什么 git 一直告诉我它是 "Auto packing the repository in background for optimum performance"?

Why does git keep telling me it's "Auto packing the repository in background for optimum performance"?

注意:我认为这是this question的重复,它谈论的是非挂起git的背景包,错误消息


在我的一个 git 存储库中,每次我调用(例如)git fetch,git 打印:

Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.

如果我重复执行 git fetch,似乎每次都会打印此内容,即使没有更改且 git fetch 无事可做。这对我来说没有多大意义。它似乎也发生在其他网络操作中,例如 git pushgit pull.

命令 returns 立即返回提示,没有进一步的输出,我在我的机器上找不到任何 git 进程 运行。它似乎只发生在这个存储库上,而且只发生在这台机器上。 git config -l | grep gc returns 没有。

如何诊断或解决此问题?

$ git --version 
git version 2.0.1

我正在使用 OS X 10.9.

我从您提供的第二条评论中找到了解决方案,Trengot,谢谢。原来我有一些悬挂的斑点,它们在 .git/objects/17 中,因此触发了打包:

$ git fsck
dangling blob d9ff0aeac4aa8b4e0907daed675ebf60278bc977
dangling blob dbff2d073741f9775c815d4a3c623736af224dad
dangling blob e1ffbab1c5b985cd1cd3bc0281075ea2ed80744a
dangling blob fdff59878ccb3a75689f4acca615cfb635288774

这清理了它们:

$ git gc --prune=now

请注意,根据下面 Henrik 的评论,这可能有点危险。保重!