All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cameron Taggart <cameron.taggart@gmail.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: git@vger.kernel.org
Subject: Re: feature request: text=input option in .gitattributes
Date: Wed, 12 Feb 2014 21:05:06 -0600	[thread overview]
Message-ID: <CAABik=txo0bkiL1V2GjvRwyfXb24PDrj9g5CHj+S-0RAV80PCw@mail.gmail.com> (raw)
In-Reply-To: <52FB99A5.9040607@web.de>

Thank you Torsten. Could some one help me clarify what this means?

https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
"This ensures that all files that git considers to be text will have
normalized (LF) line endings in the repository. The core.eol
configuration variable controls which line endings git will use for
normalized files in your working directory; the default is to use the
native line ending for your platform, or CRLF if core.autocrlf is
set."

Does this mean?
1) the files in your working directory should only be set to CRLF if
your native line endings are core.eol=crlf and core.autocrlf=true?
2) the files in your working directory should be set to CRLF by
default if your native line endings are core.eol=crlf and not
core.autocrlf=input

I was hoping it would be #1, but it does not appear to be working that
way. The F# Compiler Service that I want to source index has
text=auto. It can be used to test.

git clone https://github.com/fsharp/FSharp.Compiler.Service fcs

git config --global core.eol crlf
git clone https://github.com/fsharp/FSharp.Compiler.Service fcsCoreEolCrlf

Please help clarify how git should be working, so that I can either
log a bug or a feature request.

cheers,
Cameron

On Wed, Feb 12, 2014 at 9:56 AM, Torsten Bögershausen <tboegi@web.de> wrote:
> On 2014-02-11 15.57, Cameron Taggart wrote:
>> After requesting this as
>> https://github.com/msysgit/msysgit/issues/164, I was told to take it
>> upstream, so here I am.
>>
>> I would like a text=input feature added that has the same behavior as
>> text=auto, except that it defaults to core.autocrlf=input behavior
>> instead of core.autocrlf=true.
> If you want to normailze your repo, and keep it normalized,
> I can  recommend to use .gitattributes.
>
> Please see the excellent page here:
> https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
> And especially this part:
>
> $ echo "* text=auto" >>.gitattributes
> $ rm .git/index     # Remove the index to force git to
> $ git reset         # re-scan the working directory
> $ git status        # Show files that will be normalized
> $ git add -u
> $ git add .gitattributes
> $ git commit -m "Introduce end-of-line normalization"
>
>
>
> /Torsten
>

      reply	other threads:[~2014-02-13  3:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 14:57 feature request: text=input option in .gitattributes Cameron Taggart
2014-02-12 15:56 ` Torsten Bögershausen
2014-02-13  3:05   ` Cameron Taggart [this message]

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='CAABik=txo0bkiL1V2GjvRwyfXb24PDrj9g5CHj+S-0RAV80PCw@mail.gmail.com' \
    --to=cameron.taggart@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tboegi@web.de \
    /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.