use diff-filter=AM and -D instead of using a loop and delete