Page 1 of 1

I'm having an issue with line endings, help please

PostPosted: 02 Nov 2016, 20:36
by MTGfan
https://github.com/magefree/mage/pull/2 ... _r85860853

I have deleted my fork and started fresh several times trying to solve this. Each time results in the same. "git config core.autocrlf false" is failing to correct whatever it is that is changing the line endings. Please help me fix this problem so that I can properly push new cards. Thanks

Re: I'm having an issue with line endings, help please

PostPosted: 02 Nov 2016, 21:39
by LevelX

Re: I'm having an issue with line endings, help please

PostPosted: 03 Nov 2016, 04:49
by MTGfan
What is the correct line ending? And would the best way to do this, based on the link, be with the .gitattributes and the first example "Set the default behavior, in case people don't have core.autocrlf set. * text=<whatever the correct line ending is supposed to be>". I am figuring that one of two things is concurring. Either gen-card.sh is resulting in the wrong line ending or the files are changed at some point after in the process of transfer to github. Either way If the .gitattribute file will force the correct line ending so that whatever goes from my pc to github has the correct line ending then I assume that to be the best way to handle it.

Re: I'm having an issue with line endings, help please

PostPosted: 10 Nov 2016, 04:42
by MTGfan
I have discovered the cause and also found a workaround. I'm using windows 10 64bit and gen-card.pl generates the card file with windows line endings and changes all the line endings in the card list files to windows line endings. The work around is a netbeans plugin. I couldn't get the solutions in the previously posted link to work. The netbeans plugin appears to be the easiest workaround as it changes the line endings to the correct ones. I don't know if this is a flaw in gen-card.pl or some configuration on windows that by default is set to widows line endings that the script using.

Re: I'm having an issue with line endings, help please

PostPosted: 10 Nov 2016, 14:14
by LevelX
I guess the name of the Plugin is
Change Line Endings on Save

It's true that one I have also installed and forget about.
So we should mention this in the developer Wiki.

Re: I'm having an issue with line endings, help please

PostPosted: 10 Nov 2016, 18:31
by MTGfan
LevelX wrote:I guess the name of the Plugin is
Change Line Endings on Save

It's true that one I have also installed and forget about.
So we should mention this in the developer Wiki.
That would be the one. There is also one (show and change line endings, on netbeans site) that shows in the status bar and can be used to change them. It is listed as compatible with 8.1 so it should work with 8.2. I installed it to see what the line endings were after cloning.