Re: Applying .gitattributes text/eol changes
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Jan 13, 2011, 14:37 UTC
- Message-ID
- <4D2F0E3A.8090108@drmicha.warpmail.net>
- In-Reply-To
- <4D2F0BF3.2000808@syntevo.com>
Marc Strapetz venit, vidit, dixit 13.01.2011 15:28:
Show 14 quoted lines
>>> case of missing .git/index, Git freshly writes all working tree files, >>> ignoring already existing files which already have the correct content. >>> Maybe this behavior is by intention and makes sense in some cases. In my >>> case it has adverse effects on IDEs and probably other tools which are >>> monitoring the file system. >> >> ...but changing gitattributes is something you don't do routinely in >> your workflow; so, at worst there would be an occasional unnecessary run >> of your build process. > > Our Git-SVN bridge does it, potentially on every pull. This is why we > currently need to run "rm .git/index && git reset --hard" after every > pull, resp. every checkout (switching to another commit may result in > changed .gitattributes as well).
OK, now you're telling us what this is about ;)
Show 5 quoted lines
> If a "git checkout" would (optionally) make sure that all EOLs are > properly set according to .gitattributes, the problem would be resolved. > As this might be not so easy to implement, my suggestion was to make > "git reset --hard" work more unobtrusive. I think we can provide a > corresponding patch, if it has chances to get accepted.
There have been other cases where git update-index --really-refresh wasn't enough. You might want to check whether that is a suitable "patch attack vector". This might be useful not only for you but also for others.
Michael