Re: Forcing CRLF for files in a directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 01, 2010 at 10:12:52PM +1000, Ryan McCue wrote:
> Hi there,
>
> I'm working on a project at the moment which stores raw HTTP header data  
> along with bodies for use during testing. As each header line must be  
> separated by a CRLF, these need to remain so in the repository.
>
> My question is: Do I need to do anything special to ensure these CRLFs  
> aren't converted to LFs during checkout?

If you are working on Windows and have set autocrlf (default on in
msysgit), they will be converted to LF only in the repo if they are
auto-detected as text files, and will get LF when checked out on a
system with autocrlf false.

You can force autocrlf to not think of a file as a text file by
setting "-crlf" for that file in .gitattributes.

In the upcoming 1.7.2 release, autocrlf has been fixed to never
autodetect files with mixed line endings in the repository as text
files, but it will take considerable time before that version is used
everywhere I guess. Also, this won't really help you if you create the
files on Windows.

- Finn Arne
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]