#!/bin/sh . ./tests/lib/test-setup.sh foo_setup conf_bak=$(mktemp) cp "$conf" "$conf_bak" python3 ./pinch.py pin "$conf" ( cd "$repo" echo Other contents > other-file git add other-file git commit --amend -m 'Amended commit message' ) mv "$conf_bak" "$conf" if python3 ./pinch.py pin "$conf";then echo "FAIL: non-ancestor commit should be rejected" exit 1 else echo PASS fi