From: Ilari Liusvaara Date: Wed, 31 Mar 2010 14:16:08 GMT Subject: Re: Dealing with mac linefeeds in git repository Message-ID: <20100331141608.GA2542@LK-Perkele-V2.elisa-laajakaista.fi> In-Reply-To: On Wed, Mar 31, 2010 at 04:07:40PM +0300, jussi.sirpoma@sks.fi wrote: > I am running cygwin git version 1.6.4.2. > > Some of the source code for our projects is encoded in mac linefeeds due > to proprietary > software platform. My current solution is to flag those files tu use no > linefeed conversion and > to use separate diff program by having this in .gitattributes: > annotations or diffs. Now I am wondering if I could make git work with a > little different > configuration: > > * The *.BA files with mac linefeeds would be stored with normal linux > linefeeds > * The files would be converted on checkout to mac linefeeds the same way > as core.autcrlf works > > Is this doable or even a good approach? AFAIK, its doable. One can specify filter programs to be executed when checking out / adding files. That program could do CR <-> LF translation. See filter attribute in man gitattributes. -Ilari