#!/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