Hi Alan,


> -----Original Message-----
> From: Alan W. Irwin [mailto:ir...@beluga.phys.uvic.ca]
> Sent: Wednesday, December 16, 2015 12:59 AM
> To: PLplot development list
> Subject: [Plplot-devel] git blog
>
> My latest "interesting" experience with git concerned line endings.
>
> (I ran into this issue as part of my joint work with Arjen on the new Fortran 
> bindings
> which we plan to merge to master a month or so before I make our next release 
> to
> allow plenty of time for testing.)
>
> Getting back to the line endings topic, by default (see
> .gitattributes) our text files have the auto attribute which means the 
> repository
> version will be normalized to LF endings and the checked out versions will be 
> native
> line endings (i.e., LF for Unix, CRLF for Windows).
>
> However, I just committed (on a private topic branch) some work by Arjen that 
> he
> sent me in a tarball.  Those files in the tarball contained CRLF line 
> endings.  Here is
> what git said when I committed those (unchanged) files.
>
> software@raven> git commit
> [new_f95_update 73336a7] Fortran binding: add missing files to the new binding
> warning: CRLF will be replaced by LF in bindings/f95/plparseopts.f90.
> The file will have its original line endings in your working directory.
>
Line endings cause no end of nasty little issues like this. By the looks of the 
messages, git is keeping two settings per file: the way it should go into the 
repository and how it should be written on disk. I would have thought that 
depends only on the OS.

Several years ago I had set my editor to save files with LF instead of CRLF. 
This led to complaints from colleagues who saw these LF line endings appear in 
the Windows-based repository. Every file I touched was stored in completely new 
form because of this. So I turned it back to CRLF.

Perhaps I should take more care and send files in LF form when bypassing the 
repository.

Regards,

Arjen



DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.
------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to