#!/bin/sh set -ev rm -rf $0.dir mkdir $0.dir cd $0.dir git init cat > top.fac < 1.fac > 1.fac EOF git add top.fac cat > fac.py < 2.fac > 2.fac """ EOF git add fac.py cat > fac2.py < foo > foo """ EOF git add fac2.py git ls-files ${FAC:-../../fac} -v grep foo foo ${FAC:-../../fac} --clean if test -e foo; then echo file foo should have been deleted exit 1 fi ${FAC:-../../fac} grep foo foo exit 0