]> git.scottworley.com Git - pinch/blob - tests/reject-force-push.sh
Allow more specific invalid symlinks
[pinch] / tests / reject-force-push.sh
1 #!/bin/sh
2
3 . ./tests/lib/test-setup.sh
4
5 foo_setup
6 conf_bak=$(mktemp)
7 cp "$conf" "$conf_bak"
8
9 python3 ./pinch.py pin "$conf"
10
11 (
12 cd "$repo"
13 echo Other contents > other-file
14 git add other-file
15 git commit --amend -m 'Amended commit message'
16 )
17
18 mv "$conf_bak" "$conf"
19
20 if python3 ./pinch.py pin "$conf";then
21 echo "FAIL: non-ancestor commit should be rejected"
22 exit 1
23 else
24 echo PASS
25 fi
26