X-Git-Url: http://git.scottworley.com/pinch/blobdiff_plain/78c89e6ef13aea1cb76ef6bc52b943a7e1a03347..0e515222756a52b6f6e617a5dba149d7422546d4:/tests/reject-nonancestor2.sh diff --git a/tests/reject-nonancestor2.sh b/tests/reject-nonancestor2.sh new file mode 100755 index 0000000..924d229 --- /dev/null +++ b/tests/reject-nonancestor2.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +. ./tests/lib/test-setup.sh + +foo_setup + +( + cd "$repo" + git checkout -b historical + git checkout master + echo Other contents > other-file + git add other-file + git commit -m 'Second commit message' +) + +python3 ./pinch.py pin "$conf" + +sed -i 's/master/historical/' "$conf" + +if python3 ./pinch.py pin "$conf";then + echo "FAIL: non-ancestor commit should be rejected" + exit 1 +else + echo PASS +fi