git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Buck <buck.robert.j@gmail.com>
To: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
Cc: "git@vger.kernel.org List" <git@vger.kernel.org>,
	Dmitry Potapov <dpotapov@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	mat <matthieu.stigler@gmail.com>,
	hasen j <hasan.aljudy@gmail.com>,
	Erik Faye-Lund <kusmabite@googlemail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Avery Pennarun <apenwarr@gmail.com>,
	Finn Arne Gangstad <finnag@pvv.org>
Subject: Re: [PATCH/RFC v2 1/4] Add "core.eolStyle" variable to control  end-of-line conversion
Date: Mon, 10 May 2010 07:43:55 -0400	[thread overview]
Message-ID: <AANLkTilDiP_5Q9HrssB0lyf-jsE8LAF2ULGwEMO4BzdQ@mail.gmail.com> (raw)
In-Reply-To: <91F47297-A1B5-4AE5-8835-E3A8E452FB8A@gmail.com>

On Mon, May 10, 2010 at 12:33 AM, Eyvind Bernhardsen
<eyvind.bernhardsen@gmail.com> wrote:
> On 9. mai 2010, at 22.46, Robert Buck <buck.robert.j@gmail.com> wrote:
>
>>> No, "auto" means to enable normalization for files git doesn't identify
>>> as text files, "true" means to always normalize, and "false" means never
>>> normalize.
>>
>> I probably missed something. The part that confuses me in this
>> statement is that you said "for files git doesn't identify as text
>> files". The convert.c source is the heart of this, and if a file is
>> not identified as text it is presumed to be binary. The statement made
>> seems to imply you'd auto-convert PDF files? I know you did not mean
>> that, but it could have been read that way.
>
> Doh! I meant to write "files git _does_ identify as text files". Sorry for
> the confusion.
>
>> What specifically happens in the three modes? Would it be precise to
>> say the following?
>>
>>   "Files subject to EOL conversion are those that are explicitly
>> identified through attributes to be text files, or those
>> algorithmically determined to be text files which happen to not bear
>> the "text" file attribute. Otherwise the default value, "false",
>> applies and no EOL conversions occur."
>
> Very close, but my thinko threw you off. The "algorithmic determination" of
> text files is only performed when crlf=auto, either by the attribute or the
> config variable being set that way.
>
> The point of the "core.crlf" config variable would be to provide a default
> value for the "crlf" attribute.

Okay, so that makes sense...

   "Files subject to EOL conversion are those that are explicitly
 identified through attributes to be text files, or provided core.crlf is
set to auto, those files algorithmically determined to be text files
which happen to not bear
 the "text" file attribute. Otherwise the default value, "false",
applies and no EOL conversions occur. When conversions occur the EOL
character changes from the internal LF format to the format specified
by core.crlftype."

This would work out well if file type maps were ever introduced. Type
maps would not short circuit the explicit attributes identified by the
first clause, then for those files without attributes you'd check the
file-type maps, then fall back to the algorithmic if auto is enabled.

I like that.

  reply	other threads:[~2010-05-10 11:44 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-08 21:46 [PATCH/RFC v2 0/4] End-of-line normalization, take 2 (now only slightly scary) Eyvind Bernhardsen
2010-05-08 21:46 ` [PATCH/RFC v2 1/4] Add "core.eolStyle" variable to control end-of-line conversion Eyvind Bernhardsen
2010-05-08 21:57   ` Linus Torvalds
2010-05-08 22:17     ` Eyvind Bernhardsen
2010-05-08 22:53       ` Eyvind Bernhardsen
2010-05-08 23:08         ` Linus Torvalds
2010-05-09  8:13           ` Eyvind Bernhardsen
2010-05-09 18:11             ` Linus Torvalds
2010-05-09 20:11               ` Eyvind Bernhardsen
2010-05-09  7:00         ` Dmitry Potapov
2010-05-09  7:30           ` hasen j
2010-05-10  7:16             ` Dmitry Potapov
2010-05-09  8:34           ` Eyvind Bernhardsen
2010-05-09 10:42           ` Eyvind Bernhardsen
2010-05-09 11:14             ` Robert Buck
2010-05-09 18:59               ` Eyvind Bernhardsen
2010-05-09 20:46                 ` Robert Buck
2010-05-10  4:33                   ` Eyvind Bernhardsen
2010-05-10 11:43                     ` Robert Buck [this message]
2010-05-10 13:25                       ` Robert Buck
2010-05-10 14:03                         ` Dmitry Potapov
2010-05-09 17:02             ` Jay Soffian
2010-05-09 17:43               ` Jay Soffian
2010-05-10 18:33               ` Eyvind Bernhardsen
2010-05-09 17:45             ` Junio C Hamano
2010-05-09 18:18               ` Finn Arne Gangstad
2010-05-09 21:57                 ` Junio C Hamano
2010-05-10  5:14                   ` Eyvind Bernhardsen
2010-05-09 20:25               ` Eyvind Bernhardsen
2010-05-09 20:09             ` Finn Arne Gangstad
2010-05-10  8:13               ` Dmitry Potapov
2010-05-10 11:14                 ` Finn Arne Gangstad
2010-05-10 13:46                   ` Dmitry Potapov
2010-05-09  9:21         ` Finn Arne Gangstad
2010-05-08 21:46 ` [PATCH/RFC v2 2/4] Add tests for per-repository eol normalization Eyvind Bernhardsen
2010-05-08 21:46 ` [PATCH/RFC v2 3/4] Pass eol conv mode as an argument instead of using global auto_crlf Eyvind Bernhardsen
2010-05-08 21:46 ` [PATCH/RFC v2 4/4] Add per-repository eol normalization Eyvind Bernhardsen

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=AANLkTilDiP_5Q9HrssB0lyf-jsE8LAF2ULGwEMO4BzdQ@mail.gmail.com \
    --to=buck.robert.j@gmail.com \
    --cc=apenwarr@gmail.com \
    --cc=dpotapov@gmail.com \
    --cc=eyvind.bernhardsen@gmail.com \
    --cc=finnag@pvv.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hasan.aljudy@gmail.com \
    --cc=kusmabite@googlemail.com \
    --cc=matthieu.stigler@gmail.com \
    --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).