From: Stephen Bash <bash@genarts.com>
To: Dmitry Potapov <dpotapov@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git EOL Normalization
Date: Wed, 25 May 2011 14:06:20 -0400 (EDT) [thread overview]
Message-ID: <20898727.40273.1306346780207.JavaMail.root@mail.hq.genarts.com> (raw)
In-Reply-To: <BANLkTik3iRKx4P_3nbzygadmLPEOr2vGhA@mail.gmail.com>
----- Original Message -----
> From: "Dmitry Potapov" <dpotapov@gmail.com>
> Sent: Wednesday, May 25, 2011 1:58:33 PM
> Subject: Re: Git EOL Normalization
>
> > 1) what is the actual text file detection algorithm?
> > 2) what is the autocrlf LF/CRLF detection algorithm?
> > 3) how does autocrlf handle mixed line endings? (either in the
> > working copy or repo)
>
> Currently, the following heuristics are used:
>
> A file is considered as text if it does not have '\0' or a bare CR,
> and the number of non-printable characters is less than 1 in 128.
>
> Non-printable characters are DEL (127) and anything less than 32
> except CR, LF, BS, HT, ESC and FF.
>
> Also, to avoid problems with autocrlf=true when someone has already
> put a text file with CRLF, CRLF->LF conversion happens only if the tracked
> file in the index does not have any CR.
>
> PS I wrote this mostly from my memory, so I could miss some detail.
Thanks! This is very helpful.
Stephen
next prev parent reply other threads:[~2011-05-25 18:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20833035.39857.1306334468204.JavaMail.root@mail.hq.genarts.com>
2011-05-25 15:20 ` Git EOL Normalization Stephen Bash
2011-05-25 17:58 ` Dmitry Potapov
2011-05-25 18:06 ` Stephen Bash [this message]
2011-05-26 6:02 ` Jakub Narebski
2011-05-26 7:20 ` Dmitry Potapov
2011-05-26 16:07 ` Junio C Hamano
2011-05-26 16:28 ` Stephen Bash
2011-05-31 15:01 ` Drew Northup
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=20898727.40273.1306346780207.JavaMail.root@mail.hq.genarts.com \
--to=bash@genarts.com \
--cc=dpotapov@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.