what the text=auto docs should be

2014-02-15 Thread Cameron Taggart
It would be better if the text=auto section of the gitattributes
Manual Page had this:

This ensures that all files that git considers to be the text will
have normalized (LF) line endings in the repository. If
core.autocrlf=true, core.eol will be used to normalize the files in
your working directory. core.eol defaults to native line endings for
your platform.

I researched and put my thoughts down in a blog post:
http://blog.ctaggart.com/2014/02/time-to-kill-carriage-return.html

cheers,
Cameron
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: feature request: text=input option in .gitattributes

2014-02-12 Thread Cameron Taggart
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 tbo...@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

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


feature request: text=input option in .gitattributes

2014-02-11 Thread Cameron Taggart
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. This would ensure that the repository
is normalized and the text files in the working directory match what
is in the repository by default. In mysysgit#164, I highlighted the
behavior changes in a spreadsheet. This would still allow users to set
core.autocrlf=true if they want CRLF on their Windows system. Using
text=input instead of text=auto would ensure that Windows build
servers like TFS and TeamCity compile libraries with code that matches
exactly what is in the repository. This in turn, would make it much
much easier to do source indexing using my SourceLink project. :)

thanks,
Cameron
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html