3 # Girocco installs a pre-auto-gc hook.
4 # When $GIROCCO_DIVERT_GIT_SVN_AUTO_GC is set to 1
5 # that hook, when executed, runs this script and
6 # no matter what exit code this script uses, the
7 # pre-auto-gc hook always exits with a code of 1
8 # immediately after this script finishes thereby
9 # aborting any Git-directed gc.
11 # The `git-svn fetch` operation periodically runs
12 # `git gc --auto` which ultimately causes this
13 # script to run provided the correct conditions
14 # are met and $GIROCCO_DIVERT_GIT_SVN_AUTO_GC is
15 # set to 1 in the environment.
17 # Both the jobd/update.sh and taskd/clone.sh scripts
18 # set and export GIROCCO_DIVERT_GIT_SVN_AUTO_GC=1
19 # and force `gc.auto=1` as well whenever they process
23 . @basedir@
/jobd
/gc-util-functions.sh
27 [ -d objects
] ||
exit 1
30 [ "$cfg_permission_control" != "Hooks" ] ||
umask 000
32 v_get_proj_from_dir proj
35 if lotsa_loose_objects_or_sopacks
; then
36 echo "Packing loose objects ($(date))"
37 if pack_incremental_loose_objects_if_lockable
; then
38 echo "Packing and pruning complete ($(date))"
40 echo "Packing skipped: $lockerr ($(date))"