git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Finn Arne Gangstad <finnag@pvv.org>
To: Ryan McCue <me@ryanmccue.info>
Cc: git@vger.kernel.org
Subject: Re: Forcing CRLF for files in a directory
Date: Thu, 1 Jul 2010 15:55:00 +0200	[thread overview]
Message-ID: <20100701135500.GA20015@pvv.org> (raw)
In-Reply-To: <4C2C8644.4060208@ryanmccue.info>

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

      parent reply	other threads:[~2010-07-01 13:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-01 12:12 Forcing CRLF for files in a directory Ryan McCue
2010-07-01 13:37 ` Eyvind Bernhardsen
2010-07-01 13:55 ` Finn Arne Gangstad [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100701135500.GA20015@pvv.org \
    --to=finnag@pvv.org \
    --cc=git@vger.kernel.org \
    --cc=me@ryanmccue.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).