gc-git-svn: arrange for `git-svn fetch` to run gc-git-svn.sh
[girocco.git] / jobd / gc-git-svn.sh
blob80c5e0dbeec31722980cc40774fd94b94ea8004f
1 #!/bin/sh
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
20 # a `git-svn` mirror.
22 . @basedir@/shlib.sh
24 set -e
26 exit 0