gc.sh: pack all refs when garbage collecting
commit440ed51a46aeea5aac6321c32cf26d2c0f11efe1
authorKyle J. McKay <mackyle@gmail.com>
Wed, 4 Dec 2013 03:08:40 +0000 (3 19:08 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Wed, 4 Dec 2013 03:08:40 +0000 (3 19:08 -0800)
treec8492c1c0320d82cabc94ef190dd01b7c2c9ab2f
parent291be36aa11d873e19aefef268822856e7e5ff65
gc.sh: pack all refs when garbage collecting

A repository with many refs (e.g. thousands) can incur a large
performance penalty when performing some simple operations such as
those used by gitweb.

Pack all refs whenever a repository is garbage collected to help
mitigate the performance issue on repositories with large numbers
of refs.  Pack refs is performed before the repack to match the
normal order of a git gc command.

Having a packed-refs file used to be problematic due to the way
in which ssh push was set up -- refs stored in the packed-refs
file could not be deleted by ssh push clients because of the way
the permissions were set.  That issue was permanently eliminated
when fixupd was removed so there's no reason to avoid having a
packed-refs file now.
jobd/gc.sh