extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Sandro Santilli-3
My git-svn setup insists in adding carriage returns to the
extras/tiger_geocoder/upgrade_geocoder.bat file, as requested
by the following .gitattribute entry:

  *.bat     eol=crlf

The carriage returns where stripped by Regina in a recent commit:

                commit 0320c64fe2a1b480eef2c4cfa437536152545c22
                Author: Regina Obe <[hidden email]>
                Date:   Thu Jul 27 16:19:13 2017 +0000

                                Geocoder enhancements, add zip4 and address_alphanumeric, adjustments to pagc matching
                                Closes #3747
                                Closes #3748

                                git-svn-id: http://svn.osgeo.org/postgis/trunk@15508 b70326c6-7e19-0410-871a-916f4a2858ee

                 extras/tiger_geocoder/upgrade_geocoder.bat | 38 +++++++++++++++++++-------------------
                 1 file changed, 19 insertions(+), 19 deletions(-)

So the question now is: is the .gitattribute entry not reflected in the
SVN world ? Does anyone know how to reflect it ? Note that I'm happy with
never using carriage-returns, as long as we are consistent about it...

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Sandro Santilli-3
I'll add that reading the git log is fun:

  git log --stat extras/tiger_geocoder/upgrade_geocoder.bat

A summary of what you find in there:

  - Regina: do something
  - Strk: fix line ending
  - Regina: do something
  - Strk: fix line ending

It's about time to stop that :)

https://git.osgeo.org/gogs/postgis/postgis/commits/svn-trunk/extras/tiger_geocoder/upgrade_geocoder.bat

Regina: please take action or I'm tempted to just change
.gitattributes *not* to request CRLF in those files...

--strk;

On Sun, Aug 06, 2017 at 11:24:42PM +0200, Sandro Santilli wrote:

> My git-svn setup insists in adding carriage returns to the
> extras/tiger_geocoder/upgrade_geocoder.bat file, as requested
> by the following .gitattribute entry:
>
>   *.bat     eol=crlf
>
> The carriage returns where stripped by Regina in a recent commit:
>
> commit 0320c64fe2a1b480eef2c4cfa437536152545c22
> Author: Regina Obe <[hidden email]>
> Date:   Thu Jul 27 16:19:13 2017 +0000
>
> Geocoder enhancements, add zip4 and address_alphanumeric, adjustments to pagc matching
> Closes #3747
> Closes #3748
>
> git-svn-id: http://svn.osgeo.org/postgis/trunk@15508 b70326c6-7e19-0410-871a-916f4a2858ee
>
> extras/tiger_geocoder/upgrade_geocoder.bat | 38 +++++++++++++++++++-------------------
> 1 file changed, 19 insertions(+), 19 deletions(-)
>
> So the question now is: is the .gitattribute entry not reflected in the
> SVN world ? Does anyone know how to reflect it ? Note that I'm happy with
> never using carriage-returns, as long as we are consistent about it...
>
> --strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Paul Ramsey-3
We do need the CRLF for .bat files or they won't execute on windows, which is the whole point of them. How to fix the back'n'forth problem is something I don't know the magic for...
P

On Sun, Aug 6, 2017 at 2:29 PM, Sandro Santilli <[hidden email]> wrote:
I'll add that reading the git log is fun:

  git log --stat extras/tiger_geocoder/upgrade_geocoder.bat

A summary of what you find in there:

  - Regina: do something
  - Strk: fix line ending
  - Regina: do something
  - Strk: fix line ending

It's about time to stop that :)

https://git.osgeo.org/gogs/postgis/postgis/commits/svn-trunk/extras/tiger_geocoder/upgrade_geocoder.bat

Regina: please take action or I'm tempted to just change
.gitattributes *not* to request CRLF in those files...

--strk;

On Sun, Aug 06, 2017 at 11:24:42PM +0200, Sandro Santilli wrote:
> My git-svn setup insists in adding carriage returns to the
> extras/tiger_geocoder/upgrade_geocoder.bat file, as requested
> by the following .gitattribute entry:
>
>   *.bat     eol=crlf
>
> The carriage returns where stripped by Regina in a recent commit:
>
>               commit 0320c64fe2a1b480eef2c4cfa437536152545c22
>               Author: Regina Obe <[hidden email]>
>               Date:   Thu Jul 27 16:19:13 2017 +0000
>
>                               Geocoder enhancements, add zip4 and address_alphanumeric, adjustments to pagc matching
>                               Closes #3747
>                               Closes #3748
>
>                               git-svn-id: http://svn.osgeo.org/postgis/trunk@15508 b70326c6-7e19-0410-871a-916f4a2858ee
>
>                extras/tiger_geocoder/upgrade_geocoder.bat | 38 +++++++++++++++++++-------------------
>                1 file changed, 19 insertions(+), 19 deletions(-)
>
> So the question now is: is the .gitattribute entry not reflected in the
> SVN world ? Does anyone know how to reflect it ? Note that I'm happy with
> never using carriage-returns, as long as we are consistent about it...
>
> --strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel


_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Sandro Santilli-3
On Sun, Aug 06, 2017 at 03:04:36PM -0700, Paul Ramsey wrote:
> We do need the CRLF for .bat files or they won't execute on windows, which
> is the whole point of them. How to fix the back'n'forth problem is
> something I don't know the magic for...

I think it's something about svnprop. Mateusz should know.
I'm too lazy to learn SVN nowadays, how about switching repo to GIT
like it was done for GEOS ? (code under GIT, tickets in trac) -
are we ready now ?

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Paul Ramsey-3
I'm open to just switching to github. Year zero, all that.
P.

On Sun, Aug 6, 2017 at 3:41 PM, Sandro Santilli <[hidden email]> wrote:
On Sun, Aug 06, 2017 at 03:04:36PM -0700, Paul Ramsey wrote:
> We do need the CRLF for .bat files or they won't execute on windows, which
> is the whole point of them. How to fix the back'n'forth problem is
> something I don't know the magic for...

I think it's something about svnprop. Mateusz should know.
I'm too lazy to learn SVN nowadays, how about switching repo to GIT
like it was done for GEOS ? (code under GIT, tickets in trac) -
are we ready now ?

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel


_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

John Harvey
Hello folks,

For what it's worth, as an end user, I'd be happy with a transition to git.

I can think of one other option, although it's a little messier.  There could be a CI job that detects and corrects these situations when they occur.  I don't think it would be that painful to set up, although the downside to such a thing is that it basically continues the back-and-forth model that strk referenced.

It's worth noting that since this situation has occurred, it's causing some of my builds that use the git repo to fail.  Currently, "git clone" followed by "git checkout" does not work due to the famous "files would be overwritten by checkout" error.  For now, I can get around it with "git checkout --force", but it's worth noting that there could be other users similarly affected.

Regards,
  -John

On Sun, Aug 6, 2017 at 8:47 PM, Paul Ramsey <[hidden email]> wrote:
I'm open to just switching to github. Year zero, all that.
P.

On Sun, Aug 6, 2017 at 3:41 PM, Sandro Santilli <[hidden email]> wrote:
On Sun, Aug 06, 2017 at 03:04:36PM -0700, Paul Ramsey wrote:
> We do need the CRLF for .bat files or they won't execute on windows, which
> is the whole point of them. How to fix the back'n'forth problem is
> something I don't know the magic for...

I think it's something about svnprop. Mateusz should know.
I'm too lazy to learn SVN nowadays, how about switching repo to GIT
like it was done for GEOS ? (code under GIT, tickets in trac) -
are we ready now ?

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel


_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel


_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Regina Obe-2

I don't quite understand why this is happening at all.

 

We have in place svnprop that forces these files to have CRLF.

 

We also have in place .gitattributes that if people check out with git also forces bat files to end in CRLF.

 

So why is this a problem? 

 

From: postgis-devel [mailto:[hidden email]] On Behalf Of John Harvey
Sent: Monday, August 07, 2017 12:40 PM
To: PostGIS Development Discussion <[hidden email]>
Subject: Re: [postgis-devel] extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

 

Hello folks,

 

For what it's worth, as an end user, I'd be happy with a transition to git.

 

I can think of one other option, although it's a little messier.  There could be a CI job that detects and corrects these situations when they occur.  I don't think it would be that painful to set up, although the downside to such a thing is that it basically continues the back-and-forth model that strk referenced.

 

It's worth noting that since this situation has occurred, it's causing some of my builds that use the git repo to fail.  Currently, "git clone" followed by "git checkout" does not work due to the famous "files would be overwritten by checkout" error.  For now, I can get around it with "git checkout --force", but it's worth noting that there could be other users similarly affected.

 

Regards,

  -John

 

On Sun, Aug 6, 2017 at 8:47 PM, Paul Ramsey <[hidden email]> wrote:

I'm open to just switching to github. Year zero, all that.

P.

 

On Sun, Aug 6, 2017 at 3:41 PM, Sandro Santilli <[hidden email]> wrote:

On Sun, Aug 06, 2017 at 03:04:36PM -0700, Paul Ramsey wrote:
> We do need the CRLF for .bat files or they won't execute on windows, which
> is the whole point of them. How to fix the back'n'forth problem is
> something I don't know the magic for...

I think it's something about svnprop. Mateusz should know.
I'm too lazy to learn SVN nowadays, how about switching repo to GIT
like it was done for GEOS ? (code under GIT, tickets in trac) -
are we ready now ?


--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel

 


_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel

 


_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Sandro Santilli-3
On Mon, Aug 07, 2017 at 02:31:34PM -0400, Regina Obe wrote:
>
> We have in place svnprop that forces these files to have CRLF.

Evidently it is not working, because what you committed does not
have the carriage returns.

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Mateusz Loskot
On 7 August 2017 at 20:47, Sandro Santilli <[hidden email]> wrote:
> On Mon, Aug 07, 2017 at 02:31:34PM -0400, Regina Obe wrote:
>>
>> We have in place svnprop that forces these files to have CRLF.
>
> Evidently it is not working, because what you committed does not
> have the carriage returns.

Because Regina uses EditorConfig-aware editor
whereas your .editorconfig forces .bat files to LF?

# these are the defaults
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true


Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Mateusz Loskot
In reply to this post by Regina Obe-2
On 7 August 2017 at 20:31, Regina Obe <[hidden email]> wrote:
> I don't quite understand why this is happening at all.
>
> We have in place svnprop that forces these files to have CRLF.

I confirm this preserves CRLF on svn checkout indeed,
on both Unix and Windows.

I'm not sure how strongly svn:eol-style is preserved on commit,
if any CRLF flipped to LF (eg. due to current .editorconfig setting)
are re-converted back to CRLF.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Regina Obe-2
In reply to this post by Mateusz Loskot
Hmm it seems our editorconfig doesn't have a rule for batch files.  I guess we should add one to force it to CRLF.

Though given I haven't touched those files in a while and my local is CRLF.  I'm not sure if that's the issue.

Anyrate does anyone see an issue with adding a rule to .editorconfig

[*.{bat}]
end_of_line = crlf


-----Original Message-----
From: postgis-devel [mailto:[hidden email]] On Behalf Of Mateusz Loskot
Sent: Monday, August 07, 2017 3:04 PM
To: PostGIS Development Discussion <[hidden email]>
Subject: Re: [postgis-devel] extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

On 7 August 2017 at 20:47, Sandro Santilli <[hidden email]> wrote:
> On Mon, Aug 07, 2017 at 02:31:34PM -0400, Regina Obe wrote:
>>
>> We have in place svnprop that forces these files to have CRLF.
>
> Evidently it is not working, because what you committed does not have
> the carriage returns.

Because Regina uses EditorConfig-aware editor whereas your .editorconfig forces .bat files to LF?

# these are the defaults
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true


Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net _______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel

_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Sandro Santilli-3
In reply to this post by Mateusz Loskot
On Mon, Aug 07, 2017 at 09:03:51PM +0200, Mateusz Loskot wrote:

> On 7 August 2017 at 20:47, Sandro Santilli <[hidden email]> wrote:
> > On Mon, Aug 07, 2017 at 02:31:34PM -0400, Regina Obe wrote:
> >>
> >> We have in place svnprop that forces these files to have CRLF.
> >
> > Evidently it is not working, because what you committed does not
> > have the carriage returns.
>
> Because Regina uses EditorConfig-aware editor
> whereas your .editorconfig forces .bat files to LF?
>
> # these are the defaults
> [*]
> charset = utf-8
> end_of_line = lf
> trim_trailing_whitespace = true
> insert_final_newline = true

Good catch !
.editorconfig fixed with r15538
and CR added again to the .bat file with r15539

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Sandro Santilli-3
In reply to this post by Mateusz Loskot
On Mon, Aug 07, 2017 at 09:10:05PM +0200, Mateusz Loskot wrote:

> On 7 August 2017 at 20:31, Regina Obe <[hidden email]> wrote:
> > I don't quite understand why this is happening at all.
> >
> > We have in place svnprop that forces these files to have CRLF.
>
> I confirm this preserves CRLF on svn checkout indeed,
> on both Unix and Windows.
>
> I'm not sure how strongly svn:eol-style is preserved on commit,
> if any CRLF flipped to LF (eg. due to current .editorconfig setting)
> are re-converted back to CRLF.

In my case .editorconfig only runs if I open the file with my editor,
which didn't happen when I noticed the change. So it must have been
.gitattribute that changed the file from LF to CRLF.

I've no idea what svn:eol-style is supposed to do, but I'm pretty sure
that regina committed the file with LF line endings.

Regina: can you run some tests with and w/out the .editorconfig change ?
Does "svn diff" spots the difference between a LF and CRLF version ?

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Regina Obe-2

> In my case .editorconfig only runs if I open the file with my editor, which didn't happen when I noticed the change. So it must have been .gitattribute that changed the file from LF to CRLF.

> I've no idea what svn:eol-style is supposed to do, but I'm pretty sure that regina committed the file with LF line endings.

> Regina: can you run some tests with and w/out the .editorconfig change ?
> Does "svn diff" spots the difference between a LF and CRLF version ?

> --strk;
Yap it's probably my fault.

I'm editing with VS Code which is editor config aware.  

When I svn update the file fresh it comes down with a CRLF line break
After editing with VS Code, it changes it to LF.

So that explains why it's an issue on git.  I guess git is seeing my commit as LF and maintaining that but the .gitattributes is forcing on pull to change it to a CRLF and so a further
Git pull whatever sees the local file as different from server.

Now editing the editorconfig
Just putting in a section for bat does not seem sufficient because the

[*]
end_of_line = lf

seems to dominate.

If I remark out the

#end_of_line = lf

at the top and add a section for bat with

end_of_line = crlf

it works, my editor preserves the CRLF.

Do we really need the?

end_of_line = lf




_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Regina Obe-2
In reply to this post by Sandro Santilli-3
Disregard my note.  Maybe I was catching things mid change or I had a typo in my testing.

Strk latest commit for .editorconfig works for me.  CRLF is preserved.

-----Original Message-----
From: Regina Obe [mailto:[hidden email]]
Sent: Monday, August 07, 2017 5:06 PM
To: 'PostGIS Development Discussion' <[hidden email]>
Subject: RE: [postgis-devel] extras/tiger_geocoder/upgrade_geocoder.bat and CRLF


> In my case .editorconfig only runs if I open the file with my editor, which didn't happen when I noticed the change. So it must have been .gitattribute that changed the file from LF to CRLF.

> I've no idea what svn:eol-style is supposed to do, but I'm pretty sure that regina committed the file with LF line endings.

> Regina: can you run some tests with and w/out the .editorconfig change ?
> Does "svn diff" spots the difference between a LF and CRLF version ?

> --strk;
Yap it's probably my fault.

I'm editing with VS Code which is editor config aware.  

When I svn update the file fresh it comes down with a CRLF line break After editing with VS Code, it changes it to LF.

So that explains why it's an issue on git.  I guess git is seeing my commit as LF and maintaining that but the .gitattributes is forcing on pull to change it to a CRLF and so a further Git pull whatever sees the local file as different from server.

Now editing the editorconfig
Just putting in a section for bat does not seem sufficient because the

[*]
end_of_line = lf

seems to dominate.

If I remark out the

#end_of_line = lf

at the top and add a section for bat with

end_of_line = crlf

it works, my editor preserves the CRLF.

Do we really need the?

end_of_line = lf




_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Sandro Santilli-3
On Mon, Aug 07, 2017 at 05:11:33PM -0400, Regina Obe wrote:
> Disregard my note.  Maybe I was catching things mid change or I had a typo in my testing.
>
> Strk latest commit for .editorconfig works for me.  CRLF is preserved.

Great, thanks Mateusz for the finding and Regina for the testing.
And thanks to editorconfig.org people for the great tool !

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Sandro Santilli-3
On Tue, Aug 08, 2017 at 10:28:03AM +0200, Sandro Santilli wrote:
> On Mon, Aug 07, 2017 at 05:11:33PM -0400, Regina Obe wrote:
> > Disregard my note.  Maybe I was catching things mid change or I had a typo in my testing.
> >
> > Strk latest commit for .editorconfig works for me.  CRLF is preserved.
>
> Great, thanks Mateusz for the finding and Regina for the testing.
> And thanks to editorconfig.org people for the great tool !

Unfortunately things seem to be broken again as of r15541
What happened Regina ? Did editorconfig not kick in this time ?
Does "svn diff" show no change when you do change those line endings ?

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Regina Obe-2

> I've installed subversion to try at understanding this issue.
> On the SVN side, checking out the file results in a file with CRLF.
> On the GIT side, checking out the file results in a file with only LF, which is automatically injected CR after download, becoming the same as the SVN checkout.

> The difference is that on the SVN side you see no difference (`svn diff` shows no diffs) while on the GIT side you do see the difference.

> My suspect is that SVN is just ignoring the line ending, intentionally hiding what's on the server side and always showing CRLF on the client side.
> Maybe if the file was marked as a binary file rather than text file things would be different.
That's my recollection that SVN always maintains the line endings on server based on server's OS lb requirements

> I don't see how could an SVN only user possibly see what's being committed at this point :(

According to
http://svnbook.red-bean.com/en/1.7/svn.advanced.props.file-portability.html
the `svn:eol-style` setting value 'CRLF' (what is in current use for `extras/tiger_geocoder/upgrade_geocoder.bat`) should ensure server side has `CRLF`.

> At this point I'm guessing it is the GIT side messing things up, some wrong configuration in .gitattribute ?

> --strk;

Yes it does seem that git is the culprit here or the mirror.  But .gitattributes works as expected on other files and checking winnie's latest pull (which is using git) I can confirm she see's CRLF in the upgrade_geocode.bat and LF in the files we designated, so .gitattributes is doing it's job.

Are you sure you don't have another git setting overwriting things or something in the mirror overwriting?

Recall the reason we added .gitattributes is because otherwise we can't compile on windows under (at least not under mingw) without it.

In particular what used to happen before we had it is

When doing a git clone or git pull from, it would not maintain the line endings committed
So all the files would get pulled down with CRLF line breaks instead of LF linebreaks.  

This is normally okay except under mingw compile (not sure how VCC would behave) in particular with files .ac, .h.in, .h. GNUMakefile.in (most of  the files we have rules for in .gitattributes)
If it saw a CRLF in them in would choke and give strange error messages.

Now my question is if your git is obeying the .gitattributes, it should not be pulling down the files .bat with anything but CRLF.

Maybe there is a setting in svn and git where we can say preserve linebreak (that might be same as marking them binary I guess)



_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Sandro Santilli-3
On Tue, Aug 08, 2017 at 12:42:49PM -0400, Regina Obe wrote:

> Recall the reason we added .gitattributes is because otherwise we can't compile on windows under (at least not under mingw) without it.

Is this because checking out the .bat files from SVN downloads them
with LF instead of CRLF ? Can we ask SVN not to mess with text files
and consider them all binary files ?

> Maybe there is a setting in svn and git where we can say preserve linebreak (that might be same as marking them binary I guess)

Would that work on the windows side ?

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Loading...