My command: git show --pretty="format:" --name-only returns list of files.
Then I use xargs to run a shell script on those files:
git show --pretty="format:" --name-only | xargs -i phpmd $dir/'{}' text codesize,unusedcode,naming
However, I'd like to run that xargs command only on files with .php extension. How to filter the unwanted files?