.git-hooks/post-commit
raw| 1 | #!/usr/bin/env bash |
| 2 | # The current repo root |
| 3 | CURRENT_REPO=$(git rev-parse --show-toplevel) |
| 4 | if [[ -f ${CURRENT_REPO}/.gitlfs ]]; then |
| 5 | command -v git-lfs > /dev/null 2>&1 || { |
| 6 | 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" |
| 7 | exit 2 |
| 8 | } |
| 9 | git lfs post-commit "$@" |
| 10 | fi |
| 11 | |
| 12 | "${CURRENT_REPO}"/hack/enable-git-hooks.sh |