Re: [RFC/PATCH v3 4/5] Rename "crlf" attribute as "eolconv"
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- May 14, 2010, 04:56 UTC
- Message-ID
- <20100514045646.GA2433@progeny.tock>
- In-Reply-To
- <AANLkTil1i_vFAvT1CotYdK47LnufVKc17-1168rOVcMX@mail.gmail.com>
Hi Bob,
Robert Buck wrote:
Show 6 quoted lines
> * text > *.foo binary > > means autoconvert everything regardless of the autocrlf setting, > except for .foo files ? So now we can dispense with the autocrlf > attribute altogether if we so wish?
If I understand correctly, there is no autocrlf attribute, just a configuration item. If you put
* crlf *.foo -crlf
in your .gitattributes with current git, this means:
- if the '[core] autocrlf' configuration is not set, do not convert anything;
- otherwise, convert everything except for .foo files
Eyvind’s series improves that in a few ways.
- [from Finn Arne Gangstad] If the in-repository copy of a file contains any carriage returns, do not try to convert it. This makes it easier to deal with mistakes.
- For files with crlf enabled through attributes, always convert, whether '[core] autocrlf' is enabled or not.
- Use the '[core] autocrlf' setting to determine the desired line-ending for checked-out files (\r\n if true, \n otherwise). A new eol attribute is provided to override that setting.
- The crlf attribute gets a new synonym "text" to avoid confusion.
There is also some change to the result of file type autodetection, but as long as your .gitattributes uses '* crlf' or '* -crlf', there is no need to worry about this.
Hope that helps, Jonathan