Our customized IDE outputs XML encoded files that make them look like binary files. Errors and merges of these files do not work.
We can create ASCII versions of these files using the tr command. I would like to move on to a state in which these files are always automatically converted to ascii before they are made.
I took my copy of version control with Git and it completely warns me against using interceptors if I really don't need to.
Should I use a hook for this purpose? Or can I do something else so that the files are always converted before committing?
Windows XP with msysgit 1.7.4
- = update = -
Thank you all for your help and patience. Looking at this question I tried the following, but it does not work:
echo "*.xrp filter=xrp" > .git/info/attributes git config --global filter.xrp.clean 'tr -cd '\''\11\12\15\40-\176'\''' git config --global filter.xrp.smudge cat git checkout --force
After a configuration change, the files remain unchanged. Even when I delete and re-check.
The tr command, configured as a clean task, runs in isolation. Evidence:
$ head -n 1 cashflow/repo/C_GMM_CashflowRepo.xrp ΓΏΓΎ< ! - - XMLR epositoryfile 1 . 0 - - > $ tr -cd '\''\11\12\15\40-\176'\' < cashflow/repo/C_GMM_CashflowRepo.xrp | head -n 1 <!-- XML Repository file 1.0 -->
Can anyone see what is wrong with my configuration?
source share