]> git.scottworley.com Git - pinch/blob - tests/reject-nonancestor2.sh
Move git_cache out to a separate library
[pinch] / tests / reject-nonancestor2.sh
1 #!/bin/sh
2
3 . ./tests/lib/test-setup.sh
4
5 foo_setup
6
7 (
8 cd "$repo"
9 git checkout -b historical
10 git checkout master
11 echo Other contents > other-file
12 git add other-file
13 git commit -m 'Second commit message'
14 )
15
16 python3 ./pinch.py pin "$conf"
17
18 sed -i 's/master/historical/' "$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