I often use something like this when iterating over stuff. This is a quick hack to list files I touched and differ from main.
git diff main --name-only --relative | entr -r -c my-command