mirroring: reduce bloat caused by mirrors using git fast-import
commit5d8d5126524436be88adad78d0e05b240e5206a9
authorKyle J. McKay <mackyle@gmail.com>
Thu, 17 Apr 2014 23:59:23 +0000 (17 16:59 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 17 Apr 2014 23:59:23 +0000 (17 16:59 -0700)
tree6a49ff7a6afea0641d76656c4912fe496a20b40d
parentbbdef253e6c688045490396de2a4fa03195ee0de
mirroring: reduce bloat caused by mirrors using git fast-import

When mirroring is enabled, several of the foreign VCS mirror types
make use of git fast-import to import revisions from the foreign VCS.

Unfortunately, by design, git fast-import creates horrific packs.
They have a poor object order and have poor object deltas.  This
creates unnecessary bloat.  The bloat can be more than 4x!

While a standard git repack -a -d will correct the object order,
it will not correct the bloat since that's primarily caused by
poor object deltas.

To fix this, arrange for any git fast-import created packs to be
repacked with the --no-reuse-delta option before they participate
in the normal repack that combines everything but does not use the
--no-reuse-delta option.

Only do this at normal gc time.
jobd/gc.sh
jobd/update.sh
shlib.sh
taskd/clone.sh