Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
git-hook-template: Set more conservative options
Lorenz Leutgeb committed 22 days ago
commit ca9b1c3beb1e6bc82de0db51a861e415ddb32363
parent 7a702e3d3b3bc8b9cdd26cb13dcdc7fdda6276f9
1 file changed +4 -4
modified scripts/git-hook-template.sh
@@ -1,7 +1,7 @@
#! /usr/bin/env bash
-
set -e
+
set -euo pipefail

-
HOOK_NAME=$(basename "$0")
+
readonly HOOK_NAME="$(basename "$0")"

if ! [[ "$HOOK_NAME" =~ ^(pre-(commit|push)|post-checkout)$ ]]
then
@@ -9,8 +9,8 @@ then
    exit 1
fi

-
SENSITIVE_FILES=("justfile" "build.rs" "rust-toolchain.toml")
-
BASE_BRANCH="master"
+
readonly SENSITIVE_FILES=("justfile" "build.rs" "rust-toolchain.toml")
+
readonly BASE_BRANCH="master"

# Check which files were modified compared to the base branch.
mapfile -t CHANGED_FILES < <(comm -12 \