]> git.scottworley.com Git - pinch/blame - tests/reject-force-push.sh
Release 3.0.10
[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