X-Git-Url: https://git.ao2.it/config/vcsh.git/blobdiff_plain/e7109b26ca3742d660d77df5a94326297f00eaa0..0a50375aa4ea1d908e024e2ed8706a4c64670600:/.config/vcsh/hooks-available/sparse-checkout.sh?ds=sidebyside diff --git a/.config/vcsh/hooks-available/sparse-checkout.sh b/.config/vcsh/hooks-available/sparse-checkout.sh index b23909d..2ebf5a5 100755 --- a/.config/vcsh/hooks-available/sparse-checkout.sh +++ b/.config/vcsh/hooks-available/sparse-checkout.sh @@ -1,5 +1,10 @@ #!/bin/sh +set -e + +# If the vcsh repository does not exist, exit without doing anything. +[ -d "$GIT_DIR" ] || exit 0 + : "${XDG_CONFIG_HOME:="$HOME/.config"}" git config core.sparseCheckout true