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 we're in the chroot immediately exit suppressing auto gc
12 [ -x @perlbin@
] ||
exit 1
18 # Make sure the current directory is where we expect to be
19 [ "${GIT_DIR+set}" != "set" ] ||
{ [ -n "$GIT_DIR" ] && [ -d "$GIT_DIR" ]; } ||
unset GIT_DIR
20 [ -n "$GIT_DIR" ] || GIT_DIR
="$(git rev-parse --git-dir)"
21 [ -n "$GIT_DIR" ] && cd -P "${GIT_DIR:-.}" ||
exit 1
22 case "${PWD%/*}" in */worktrees
)
25 # But it COULD just be a coincidence...
26 [ -s commondir
] && [ -s HEAD
] &&
27 _cmndir
= && read -r _cmndir
<commondir
2>/dev
/null
&&
28 [ -n "$_cmndir" ] && [ -d "$_cmndir" ]
30 # ...it is not, fix it!
31 cd -P "$_cmndir" ||
exit 1
34 GIT_DIR
="." GIT_PREFIX
= && export GIT_DIR
37 case "$PWD" in *?
/mob
)
39 GIROCCO_PERSONAL_MOB
=1
48 unset GIROCCO_SUPPRESS_AUTO_GC_UPDATE
49 .
"$cfg_basedir/jobd/generate-auto-gc-update.sh"
50 generate_auto_gc_update