We want to run git filter-branch
over a large codebase reformatting PHP files. Since we have over 21k commits phpcbf
wants to format the whole codebase every commit of filter-branch
. Is it possible to get just the files that have changed for each commit and format them specifically? Something like...
git filter-branch --tree-filter \
'FILES=$(<something> | grep .php) php /usr/local/bin/phpcbf.phar $FILES || true'