Git development
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Alexander Veit" <alexander.veit@gmx.net>
Cc: <git@vger.kernel.org>
Subject: Re: Per file configurable eol-style transformations with Git?
Date: Sat, 21 Nov 2009 13:18:16 -0800 (PST)	[thread overview]
Message-ID: <m3tywnbmpj.fsf@localhost.localdomain> (raw)
In-Reply-To: <9ED0EB52C33C41209726C6F4DB7FC194@helium>

"Alexander Veit" <alexander.veit@gmx.net> writes:

> we have projects that contain text files that need to
> have different end-of-line sequences, depending on the
> type of file, and depending on the operating system where
> they are checked out.
> 
> There are files that have
> 
>  - LF line breaks on each platform,
>  - CR LF line breaks on each platform, or
>  - either LF or CR LF line breaks, depending on the
>    platform's native end-of-line style.
> 
> With Subversion, the correct behaviour in checkouts, commits,
> diffs, or merges can easily be achieved by setting the appropriate
> svn:eol-style [*].
> 
> As I understand the Git documentation there's no such concept as a
> repository end-of-line style, or as an end-of-line transformation
> between repository and working copy.
> 
> So I wonder if it is possible to mimic Subversion's end-of-line handling
> with Git, especially for the svn:eol-style=native.

See `crlf` attribute, which can be set, unset, unspecified, set to
"input", and used together with core.autocrlf ("true", "false", "input")
and core.safecrlf.  Attributes can be set per path (using globbing
patterns) in .gitattributes file in tree, or in .git/info/attributes
(per repository).

HTH
-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2009-11-21 21:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-21 20:21 Per file configurable eol-style transformations with Git? Alexander Veit
2009-11-21 21:18 ` Jakub Narebski [this message]
2009-11-21 23:49   ` Alexander Veit
2009-11-22  1:24     ` Junio C Hamano

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=m3tywnbmpj.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=alexander.veit@gmx.net \
    --cc=git@vger.kernel.org \
    /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