git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Per file configurable eol-style transformations with Git?

From
Alexander Veit <alexander.veit@gmx.net>
Date
Nov 21, 2009, 23:49 UTC
Message-ID
<1050CAACABF64864A0CF79C957BF773B@helium>
In-Reply-To
<m3tywnbmpj.fsf@localhost.localdomain>
Jakub Narebski wrote:
Show 5 quoted lines
> 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).
I've already tried 
[core]
  autoCRLF = true

in the global gitconfig under Windows. After git clone an immediate git diff shows every line changed in certain files:

diff --git a/c_crlf_text.txt b/c_crlf_text.txt
index 3b0a76f..3473745 100644
--- a/c_crlf_text.txt
+++ b/c_crlf_text.txt
@@ -1,5 +1,5 @@
-z1
-z2
-z3
-z4
-
+z1
+z2
+z3
+z4
+

file * on Windows:
c___lf_text.txt;  ASCII text, with CRLF line terminators
c_crlf_text.txt;  ASCII text, with CRLF line terminators


file * on Linux
c_crlf_text.txt:  ASCII text, with CRLF line terminators
c___lf_text.txt:  ASCII text

I don't know if this behaviour is supposed to be correct,
but to me it seems to be wrong.

git version 1.6.5.1.1367.gcd48
-- 
Cheers,
Alex
Previous: Jakub NarebskiNext: Junio C Hamano
Message 3 of 4 in “Per file configurable eol-style transformations with Git?”
  1. Alexander VeitNov 21, 2009
  2. Jakub NarebskiNov 21, 2009
  3. Alexander VeitNov 21, 2009
  4. Junio C HamanoNov 22, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.