Debian Codegraph @

t/t-install-custom-hooks-path-unsupported.sh

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