corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis E. Hamilton" <>
Subject RE: Coding Standards page
Date Wed, 07 Jan 2015 20:42:32 GMT
I have added an appropriate (I hope) .gitattributes file to the Corinthia repository.

For SVN, it is necessary to make local changes to adjust line-endings cross-platform.  The
relevant ASF file for this is at <>.

It turns out I have a custom one of these *and* it is in effect.  The problem was I had replaced
the rules for *.html and *.htm with ones that specified the MIME type and removed the svn:eol-style
attribute, thinking it didn't matter.  My bad. I did that years ago! (June 2011)  It does
matter for DIFF and for what others think the "right" line ending is.

I have fixed that in my local SVN settings.

PS: I have the SVN definitions for the ODF documents, and I need to update them for the Microsoft
Office documents.  I assume that having these binaries is all right in collections of test
documents, so long as they are not in the part of our repositories that represent released
source code.

 - Dennis

-----Original Message-----
From: Dennis E. Hamilton [] 
Sent: Tuesday, January 6, 2015 12:48
Subject: RE: Coding Standards page

 -- replying below to --
From: jan i [] 
Sent: Tuesday, January 6, 2015 11:38
Subject: Re: Coding Standards page

On Tuesday, January 6, 2015, Peter Kelly <> wrote:

> > On 7 Jan 2015, at 1:26 am, Dennis E. Hamilton <
> <javascript:;>> wrote:
[ ... ]
> > I notice that the requirement for Unix line endings is not included, nor
> is there information on how to control that when working with the
> repository.
> Yes - we need to state this and also explain how this can be enforced with
> a git configuration option (something I haven’t had a chance to look into
> yet).

This is not really coding standard but git usage, but its ok for me if we
mix it all.

   Well, the problem is we can't just tell everyone they have to use Unix
   Newline codes and not use CR-LF.  First, it makes no sense if they are
   operating on Windows, and it only matters for code that is exchanged
   via the repo. (It matters for patches too, but my brain just exploded.)
   That means we need to explain how to ensure that only Unix Newline codes
   end up in the repository, which is where it matters.

   I did find out where in GitHub there is information about this.  Here it
   is again:

    The line-ending does have controls in SVN and Git configurations.  
    So long as a file is known to be text, there are controls in place.  
    Here is GitHub on the subject, 

    Note that it is very important to be certain that Git knows what files 
    *not* to make these adjustments on, since it will damage binaries too 
    when they are not excluded from treatment as text.  I don't know how 
    much this impacts PGP-signed material.

    I suggest the .gitattributes approach be set up in the Corinthia 
    repository with text=auto and the indicated examples.  After that is 
    done, those of us using Windows may need to re-clone the repository 
    to have everything in sync.

   PS: I have no idea how line ends show up in the batch scripts I 
   put on the repository.  They work fine for me, of course.

[ ... ]

View raw message