This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / .tangled / hooks / install.sh
890 B 29 lines
1#!/usr/bin/env bash 2# 3# install.sh — enable the repo's git hooks for your local clone. 4# 5# This points git's core.hooksPath at .tangled/hooks so the version-controlled 6# hooks in this directory run. One command, nothing copied, updates travel with 7# the repo. 8# 9# ./.tangled/hooks/install.sh 10# 11# To undo: 12# git config --unset core.hooksPath 13 14set -euo pipefail 15 16# Resolve the repo root regardless of where this is invoked from. 17root="$(git rev-parse --show-toplevel)" 18cd "$root" 19 20hooks_dir=".tangled/hooks" 21 22git config core.hooksPath "$hooks_dir" 23chmod +x "$hooks_dir"/commit-msg "$hooks_dir"/commit-msg-lint.sh 2>/dev/null || true 24 25echo "Installed git hooks: core.hooksPath -> $hooks_dir" 26echo 27echo "Note: jj (jujutsu) does not run git hooks. jj users are covered by the" 28echo "commit-lint CI workflow; lint locally on demand with:" 29echo " .tangled/hooks/commit-msg-lint.sh --rev @"