1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#!/usr/bin/env bash
. "$(dirname "$0")/testlib.sh"
# These tests rely on behavior found in Git versions less than 2.9.0 to perform
# themselves, specifically:
# - lack of core.hooksPath support
ensure_git_version_isnt $VERSION_HIGHER "2.9.0"
begin_test "install with unsupported core.hooksPath"
(
set -e
repo_name="unsupported-custom-hooks-path"
git init "$repo_name"
cd "$repo_name"
hooks_dir="custom_hooks_dir"
mkdir -p "$hooks_dir"
git config --local core.hooksPath "$hooks_dir"
git lfs install 2>&1 | tee install.log
grep "Updated Git hooks" install.log
[ ! -e "$hooks_dir/pre-push" ]
[ -e ".git/hooks/pre-push" ]
)
end_test
|