File: post-commit

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 (12 lines) | stat: -rwxr-xr-x 458 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env bash
# The current repo root
CURRENT_REPO=$(git rev-parse --show-toplevel)
if [[ -f ${CURRENT_REPO}/.gitlfs ]]; then
  command -v git-lfs > /dev/null 2>&1 || {
    echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.\n"
    exit 2
  }
  git lfs post-commit "$@"
fi

"${CURRENT_REPO}"/hack/enable-git-hooks.sh