From: Sam Ravnborg <sam@ravnborg.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Junio C Hamano <junkio@cox.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Alexander Litvinov <litvinov2004@gmail.com>,
Mark Levedahl <mlevedahl@verizon.net>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: mingw, windows, crlf/lf, and git
Date: Wed, 14 Feb 2007 17:47:35 +0100 [thread overview]
Message-ID: <20070214164735.GA28359@uranus.ravnborg.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0702140823220.3604@woody.linux-foundation.org>
On Wed, Feb 14, 2007 at 08:28:24AM -0800, Linus Torvalds wrote:
>
>
> On Wed, 14 Feb 2007, Sam Ravnborg wrote:
> >
> > > (Which means that I suspect I made the default for "auto_crlf" be wrong in
> > > my patch: I probably should not default to checking out with CRLF, but
> > > checking out with just LF, and only do the CRLF->LF conversion on input).
> >
> > Expect that it seems a few br0ken programs yet does not support LF as
> > end-of-line marker - so .gitattriutes make take special care here.
>
> Yes, but I also think that even without .gitattributes, you just want to
> have a default for what "text" actually means, and it's entirely possible
> that the default should be: "check out with just LF, and on check-in turn
> CRLF into LF".
The definition of what is "text" and what action to take upon check-in /
check-out of text is two sepearate things.
I could see it as beneficial as a per-project or even as an overall
git-policy to say "checkin-as-LF" - "checkout-as-LF" to overcome
interoperability issues when more tools gets UNIX* based.
>
> But exactly because _some_ programs might want to always see CRLF on input
> too, it should be overridable.
Which is where I see .gitattributes come into play.
-> A rule that says files with extension .prj and of type "text" shall not see
any conversion.
In this way almost all "text" over time get a proper format and the remaining
brain-dead tools that continue to save in CRLF format will not destroy the sane
LF format.
If anything gets defualt I would vote for LF. But overrideable.
My editor-of-choice does eol auto-sense. If I recall correct it scans the
first 200 lines and counts number of CR,LF,CRLF and based on this judge the
actual eol character used. But not all editors are that sensible :-(
Sam
next prev parent reply other threads:[~2007-02-14 16:47 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-11 23:13 mingw, windows, crlf/lf, and git Mark Levedahl
2007-02-11 23:34 ` Johannes Schindelin
2007-02-12 0:46 ` Jakub Narebski
2007-02-12 2:36 ` Mark Levedahl
2007-02-12 11:21 ` Johannes Schindelin
2007-02-12 0:14 ` Robin Rosenberg
2007-02-12 2:37 ` Mark Levedahl
2007-02-12 4:24 ` Theodore Tso
2007-02-12 7:28 ` David Lang
2007-02-12 11:36 ` Johannes Schindelin
2007-02-12 17:20 ` Linus Torvalds
2007-02-12 22:37 ` Johannes Schindelin
2007-02-12 23:02 ` Linus Torvalds
2007-02-12 22:54 ` Junio C Hamano
2007-02-12 23:02 ` Junio C Hamano
2007-02-12 23:09 ` Linus Torvalds
2007-02-12 23:25 ` Linus Torvalds
2007-02-12 23:23 ` David Lang
2007-02-12 23:24 ` Johannes Schindelin
2007-02-12 23:42 ` Junio C Hamano
2007-02-12 23:46 ` David Lang
2007-02-12 23:50 ` Johannes Schindelin
2007-02-13 0:59 ` Mark Levedahl
2007-02-13 1:06 ` Johannes Schindelin
2007-02-13 1:13 ` Shawn O. Pearce
2007-02-13 1:20 ` David Lang
2007-02-13 1:36 ` Mark Levedahl
2007-02-13 5:18 ` Jeff King
2007-02-13 0:32 ` Mark Levedahl
2007-02-13 2:02 ` Junio C Hamano
2007-02-13 3:21 ` Mark Levedahl
2007-02-13 6:05 ` Junio C Hamano
2007-02-13 3:32 ` Alexander Litvinov
2007-02-13 10:06 ` Johannes Schindelin
2007-02-13 12:16 ` Alexander Litvinov
2007-02-13 12:37 ` Johannes Schindelin
2007-02-13 19:36 ` Mark Levedahl
2007-02-13 20:32 ` Linus Torvalds
2007-02-14 1:42 ` Mark Levedahl
2007-02-14 2:16 ` Linus Torvalds
2007-02-13 21:58 ` Robin Rosenberg
2007-02-14 1:18 ` Mark Levedahl
2007-02-13 16:52 ` Linus Torvalds
2007-02-13 17:23 ` Linus Torvalds
2007-02-13 17:23 ` Linus Torvalds
2007-02-13 18:00 ` Junio C Hamano
2007-02-13 19:07 ` Linus Torvalds
2007-02-13 20:42 ` Sam Ravnborg
2007-02-13 21:08 ` Nicolas Pitre
2007-02-13 23:19 ` David Lang
2007-02-13 23:28 ` Linus Torvalds
2007-02-14 8:41 ` Sam Ravnborg
2007-02-14 16:28 ` Linus Torvalds
2007-02-14 16:47 ` Sam Ravnborg [this message]
2007-02-14 3:47 ` Alexander Litvinov
2007-02-14 5:16 ` Junio C Hamano
2007-02-14 5:36 ` Linus Torvalds
2007-02-14 11:10 ` Johannes Schindelin
2007-02-14 14:26 ` Mark Levedahl
2007-02-14 15:51 ` Linus Torvalds
2007-02-14 16:39 ` Junio C Hamano
2007-02-14 17:01 ` Linus Torvalds
2007-02-14 17:29 ` Junio C Hamano
2007-02-14 17:43 ` Linus Torvalds
2007-02-14 15:56 ` Johannes Schindelin
2007-02-14 16:23 ` Linus Torvalds
2007-02-14 17:28 ` Mark Levedahl
2007-02-14 18:17 ` Robin Rosenberg
2007-02-14 18:31 ` Linus Torvalds
2007-02-14 20:24 ` Robin Rosenberg
2007-02-14 15:44 ` Linus Torvalds
2007-02-14 15:53 ` Johannes Schindelin
2007-02-14 11:36 ` Alexander Litvinov
2007-02-14 16:37 ` Linus Torvalds
2007-02-14 17:18 ` Junio C Hamano
2007-02-14 16:16 ` Johannes Sixt
2007-02-14 16:53 ` Linus Torvalds
2007-02-13 18:05 ` Johannes Schindelin
2007-02-13 17:25 ` Nicolas Pitre
2007-02-13 18:04 ` Johannes Schindelin
2007-02-13 18:11 ` Junio C Hamano
2007-02-13 18:39 ` Linus Torvalds
2007-02-13 18:42 ` Johannes Schindelin
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=20070214164735.GA28359@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=litvinov2004@gmail.com \
--cc=mlevedahl@verizon.net \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).