Git diffs and newline characters

​​Would it be worth advising Eclipse users (e.g. us) to set this General | Workspace preference:

pastedImage.png

instead of the default setting which may be Windows or Unix.

I’m assuming here that files in Git are generally Unix formatted.

I’ll keep digging into Git configuration options to control the diffs as well, but this seem to be a bit…problematic…

Mungo

The University of Dundee is a registered Scottish Charity, No: SC015096

Good idea! I think this is important to make patching easier. Done in my installation!

Thanks, Mungo.

pastedImage.png

···

2014-10-08 10:21 GMT+02:00 Mungo Carstairs <g.m.carstairs@dundee.ac.uk>:

​​Would it be worth advising Eclipse users (e.g. us) to set this General | Workspace preference:

instead of the default setting which may be Windows or Unix.

I’m assuming here that files in Git are generally Unix formatted.

I’ll keep digging into Git configuration options to control the diffs as well, but this seem to be a bit…problematic…

Mungo

The University of Dundee is a registered Scottish Charity, No: SC015096


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

​​Another suggestion:

Jalview Project Configuration:

If we add a file to the root of the Jalview project named

.gitattributes

containing this line:

  • text=auto

then that should ensure that all commits of text files are normalised to LF (not CRLF) line endings.

See

https://help.github.com/articles/dealing-with-line-endings/#per-repository-settings

NB I haven’t actually committed or tried this yet because I am cautious about the note at https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings

The University of Dundee is a registered Scottish Charity, No: SC015096

pastedImage.png

···

From: jalview-dev-bounces@jalview.org jalview-dev-bounces@jalview.org on behalf of David Roldán Martínez darolmar@gmail.com
Sent: 08 October 2014 10:52
To: Jalview Development List
Subject: Re: [Jalview-dev] Git diffs and newline characters

Good idea! I think this is important to make patching easier. Done in my installation!

Thanks, Mungo.

2014-10-08 10:21 GMT+02:00 Mungo Carstairs <g.m.carstairs@dundee.ac.uk>:

​​Would it be worth advising Eclipse users (e.g. us) to set this General | Workspace preference:

instead of the default setting which may be Windows or Unix.

I’m assuming here that files in Git are generally Unix formatted.

I’ll keep digging into Git configuration options to control the diffs as well, but this seem to be a bit…problematic…

Mungo

The University of Dundee is a registered Scottish Charity, No: SC015096


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

In addition to the above, if you are on a windows platform, you need to set autocrlf to true in your git config:
https://help.github.com/articles/dealing-with-line-endings/#global-settings-for-line-endings

Jim

pastedImage.png

···

On 08/10/2014 11:51, Mungo Carstairs wrote:

then, should we create the file or is it better to wait?

pastedImage.png

···

2014-10-08 10:21 GMT+02:00 Mungo Carstairs <g.m.carstairs@dundee.ac.uk>:

​​Would it be worth advising Eclipse users (e.g. us) to set this General | Workspace preference:

instead of the default setting which may be Windows or Unix.

I’m assuming here that files in Git are generally Unix formatted.

I’ll keep digging into Git configuration options to control the diffs as well, but this seem to be a bit…problematic…

Mungo

The University of Dundee is a registered Scottish Charity, No: SC015096


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev