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