How to determine files that are subjected to filter via gitattributes when filter is executed?

Posted by rasjani on Stack Overflow See other posts from Stack Overflow or by rasjani
Published on 2010-05-20T11:16:18Z Indexed on 2010/05/20 11:20 UTC
Read the original article Hit count: 211

Filed under:
|
|

I have bunch of ruby scripts in a git repository and it seems to be really hard to enforce people to write properly indented code.

I also have a small ruby script that formats to code to specific standard and now i would like to run that as a a filter script so that junk wont get committed into repository.

echo "*.rb filter=rubyfilter" > .gitattributes
echo "[filter \"rubyfilter\"]" >> .git/config
echo "    clean = /home/rasjani/bin/rbeauty" >> .git/config
echo "    smudge = /home/rasjani/bin/rbeauty" >> .git/config

does the dirty trick git side but the ruby script should then process the files affected:

how / where do i look those up from ?

© Stack Overflow or respective owner

Related posts about git

Related posts about gitattributes