]> git.scottworley.com Git - pinch/blame - tests/reject-force-push.sh
fallback git-cache 1.0.0 -> 1.2.1
[pinch] / tests / reject-force-push.sh
CommitLineData
0e515222
SW
1#!/bin/sh
2
3. ./tests/lib/test-setup.sh
4
5foo_setup
6conf_bak=$(mktemp)
7cp "$conf" "$conf_bak"
8
9python3 ./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
18mv "$conf_bak" "$conf"
19
20if python3 ./pinch.py pin "$conf";then
21 echo "FAIL: non-ancestor commit should be rejected"
22 exit 1
23else
24 echo PASS
25fi
26