File: enable-git-hooks.sh

package info (click to toggle)
checksec 2.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 10,936 kB
  • sloc: sh: 1,882; makefile: 2
file content (8 lines) | stat: -rwxr-xr-x 209 bytes parent folder | download
1
2
3
4
5
6
7
8
#!/usr/bin/env bash

# enable git commit hooks

LOCAL_REPO="$(git rev-parse --show-toplevel)"
if [[ -d ${LOCAL_REPO}/.git-hooks/ ]]; then
  git config core.hooksPath "${LOCAL_REPO}/.git-hooks/" > /dev/null
fi