You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure, there might also be peculiarities between git clients eg. cygwin has a git client that behaves 'unix' but eg toirtoise or another win native client has windows behaviour.
also none of them share the config afaik.
Think it's a trial and error thing..
looking at the .gitattributes i notice that ths .sh extension is not listed, so git will just guestimate the appropriate line ending convention to use, maybe adding a line *.sh text will just make it behave properly
@domi-nique please drop the checked out repo and try again. If still not working you can also explicitly convert to windows format via the tool unix2dos I think
Isn't that something that depends on various IDE / plugins support?
From a quick look I see not all features (e.g. end_of_line) are supported completely everywhere.
Well the majority works with plugins (Eclipse, NetBeans, etc).
Even then, searching their supported properties sections, not all are there.
Doesn't that mean that essentially we could have missing functionality?
We could use separate batch files (sh and bat), e.g. that's how Gradle wrapper [1] [2] in GH Android sample works.
More to maintain and Windows users will not have to setup a Unix-like environment to run GH.
Activity
karussell commentedon Jun 18, 2015
Did you follow the windows specific documentation and installed cygwin or similar?
domi-nique commentedon Jun 18, 2015
yes, and i did it with cygwin :/
mprins commentedon Jun 18, 2015
you may have cloned with a wrong line ending convention, causing git to do a conversion while getting the files
check
git config -loutputkarussell commentedon Jun 18, 2015
@mprins good idea. Do you know if our settings are wrong? https://github.com/graphhopper/graphhopper/blob/master/.gitattributes
I would prefer if it works out of the box on every OS
mprins commentedon Jun 18, 2015
I'm not sure, there might also be peculiarities between git clients eg. cygwin has a git client that behaves 'unix' but eg toirtoise or another win native client has windows behaviour.
also none of them share the config afaik.
Think it's a trial and error thing..
devemux86 commentedon Jun 18, 2015
An idea could be to download the GH repository zip from the main page and unzip (normally the OS can handle it better this way).
mprins commentedon Jun 18, 2015
for a project I have building on the AppVeyor CI I do this:
mprins commentedon Jun 18, 2015
looking at the .gitattributes i notice that ths .sh extension is not listed, so git will just guestimate the appropriate line ending convention to use, maybe adding a line
*.sh textwill just make it behave properlyfixing line endings for .sh files in git attr, see #449
karussell commentedon Jun 18, 2015
oh, thanks - fixed!
@domi-nique please drop the checked out repo and try again. If still not working you can also explicitly convert to windows format via the tool unix2dos I think
karussell commentedon Aug 10, 2015
Closing here, if still not fixed - please reopen!
karussell commentedon Aug 25, 2015
Maybe we should use editorconfig to fix this properly (?)
devemux86 commentedon Aug 25, 2015
Isn't that something that depends on various IDE / plugins support?
From a quick look I see not all features (e.g.
end_of_line) are supported completely everywhere.karussell commentedon Aug 25, 2015
See download - many IDEs have native support
What do you mean? The line ending could be additionally forced this way as it looks that the git-way fails sometimes.
devemux86 commentedon Aug 25, 2015
Well the majority works with plugins (Eclipse, NetBeans, etc).
Even then, searching their supported properties sections, not all are there.
Doesn't that mean that essentially we could have missing functionality?
karussell commentedon Aug 25, 2015
I'm only speaking for the line ending ... but yes, the functionality for code formatting is kind of not existing for this
karussell commentedon Oct 28, 2015
Still an user experienced this issue, and he needed to install a unix environment with unix line endings to fix this. Hmmh.
devemux86 commentedon Oct 28, 2015
We could use separate batch files (
shandbat), e.g. that's how Gradle wrapper [1] [2] in GH Android sample works.More to maintain and Windows users will not have to setup a Unix-like environment to run GH.
karussell commentedon Oct 28, 2015
I wouldn't be able to maintain this.
highsource commentedon Aug 16, 2016
dos2unix graphhopper.shworked for me.zstadler commentedon Oct 3, 2016
There is a maintenance-free solution, based on this stackoverflow answer.
Adding this line just after the #! line:
Note that the comment is needed in order to ignore the CR in that line, which is read before the option takes effect.
zstadler commentedon Oct 3, 2016
Created PR #816