3 # Prevent any gc --auto from taking place
4 # And make $Girocco::Config::autogchack happen
6 # Beware, we MAY be running in a chroot!
8 # If GIROCCO_SUPPRESS_AUTO_GC_UPDATE immediately exit suppressing auto gc
9 [ "${GIROCCO_SUPPRESS_AUTO_GC_UPDATE:-0}" = "0" ] ||
exit 1
11 # If GIROCCO_DIVERT_GIT_SVN_AUTO_GC divert to $basedir/jobd/gc-git-svn.sh
12 [ "${GIROCCO_DIVERT_GIT_SVN_AUTO_GC:-0}" = "0" ] ||
{
13 @basedir@
/jobd
/gc-git-svn.sh
17 # If we're in the chroot immediately exit suppressing auto gc
18 [ -x @perlbin@
] ||
exit 1
24 # Make sure the current directory is where we expect to be
25 [ "${GIT_DIR+set}" != "set" ] ||
{ [ -n "$GIT_DIR" ] && [ -d "$GIT_DIR" ]; } ||
unset GIT_DIR
26 [ -n "$GIT_DIR" ] || GIT_DIR
="$(git rev-parse --git-dir)"
27 [ -n "$GIT_DIR" ] && cd -P "${GIT_DIR:-.}" ||
exit 1
28 case "${PWD%/*}" in */worktrees
)
31 # But it COULD just be a coincidence...
32 [ -s commondir
] && [ -s HEAD
] &&
33 _cmndir
= && read -r _cmndir
<commondir
2>/dev
/null
&&
34 [ -n "$_cmndir" ] && [ -d "$_cmndir" ]
36 # ...it is not, fix it!
37 cd -P "$_cmndir" ||
exit 1
40 GIT_DIR
="." GIT_PREFIX
= && export GIT_DIR
43 case "$PWD" in *?
/mob
)
45 GIROCCO_PERSONAL_MOB
=1
54 unset GIROCCO_SUPPRESS_AUTO_GC_UPDATE
55 .
"$cfg_basedir/jobd/generate-auto-gc-update.sh"
56 generate_auto_gc_update