From: Dmitry Potapov <dpotapov@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, gitster@pobox.com, torvalds@linux-foundation.org
Subject: Re: core.autocrlf considered half-assed
Date: Tue, 9 Mar 2010 10:24:12 +0300 [thread overview]
Message-ID: <20100309072412.GF31105@dpotapov.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.1.00.1003081225280.14277@intel-tinevez-2-302>
On Mon, Mar 08, 2010 at 12:29:01PM +0100, Johannes Schindelin wrote:
>
> Easiest example:
>
> $ git clone -n git://repo.or.cz/git.git html-docs
> $ cd html-docs/
> $ git config core.autocrlf true
> $ git checkout -t origin/html
> $ git status
As Junio explained in another mail, it was intentional to have all HTML
files with CRLF, because they are supposed to have that ending on all
platforms. What is missing, however, is .gitattributes, which would tell
to Git that we do not want to autocrlf conversion for HTML files. This
can be done by adding .gitattributes:
$ cat >> .gitattributes <<EOF
*.html -crlf
EOF
I've just noticed that user-manual.html differs from other HTML files in
that it uses LF ending. I think it is a mistake, and this file should be
converted to have CRLF, but if you want to have all HTML files except
user-manual.html to have CRLF then you can do that too:
$ cat > .gitattributes <<EOF
*.html -crlf
user-manual.html crlf
EOF
I hope Junio will add the right version of .gitattributes, so users with
autocrlf=true will not suffer.
Dmitry
next prev parent reply other threads:[~2010-03-09 12:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-05 23:23 core.autocrlf considered half-assed Johannes Schindelin
2010-03-07 9:27 ` Dmitry Potapov
2010-03-07 23:45 ` Linus Torvalds
2010-03-08 18:57 ` Tait
2010-03-08 19:15 ` Johannes Schindelin
2010-03-08 20:31 ` Junio C Hamano
2010-03-09 9:28 ` Johannes Schindelin
2010-03-09 17:11 ` Junio C Hamano
2010-03-08 11:29 ` Johannes Schindelin
2010-03-09 7:24 ` Dmitry Potapov [this message]
2010-03-09 9:29 ` Johannes Schindelin
2010-03-09 10:11 ` Dmitry Potapov
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=20100309072412.GF31105@dpotapov.dyndns.org \
--to=dpotapov@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).