commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Herbert <alex.d.herb...@gmail.com>
Subject Re: [statitsics] .gitattributes
Date Fri, 24 May 2019 16:25:37 GMT

On 24/05/2019 15:55, Eric Barnhill wrote:
> +1
>
> Users should also beware that working on a repo in Windows in an IDE can
> cause the file to take on a pile of Windows line endings which git then
> pushes. This has happened to me elsewhere. Maybe this fix takes care of it.

 From what I understand this should fix git pushing windows line endings 
for anyone using it on windows.

Following the guidelines on the git documentation I tried this:

$ echo "* text=auto" >.gitattributes
$ git add --renormalize .
$ git status        # Show files that will be normalized
$ git commit -m "Introduce end-of-line normalization"

It finds 3 files that require normalisation:

         modified:   src/site/xdoc/download_statistics.xml
         modified:   src/site/xdoc/issue-tracking.xml
         modified:   src/site/xdoc/mail-lists.xml

So adding this change currently does not effect many files. I've created 
a PR for this.

Alex


>
> On Fri, May 24, 2019, 00:28 Alex Herbert <alex.d.herbert@gmail.com> wrote:
>
>> The recent PR to add a new module to statistics may have suffered from
>> problems with converting line endings.
>>
>> This can be solved by having Windows users run this (optionally with
>> --global):
>>
>>> git config core.autocrlf true
>> But a better fix [1] is to add a .gitattributes file [2] containing:
>>
>> * text=auto
>>
>> The fix then applies to anyone using the repo irrespective of their own
>> git global config.
>>
>> [1] https://www.edwardthomson.com/blog/git_for_windows_line_endings.html <
>> https://www.edwardthomson.com/blog/git_for_windows_line_endings.html>
>> [2] https://git-scm.com/docs/gitattributes <
>> https://git-scm.com/docs/gitattributes>
>>
>> Any objections to modifying the repo to have this configuration file?
>>
>> Alex
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message