Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle line endings #756

Merged
merged 3 commits into from
May 8, 2016
Merged

Conversation

dcy2003
Copy link
Contributor

@dcy2003 dcy2003 commented May 4, 2016

See details and links on issue #755

@rfecher
Copy link
Contributor

rfecher commented May 5, 2016

the intent of the .gitattributes previously was to ensure that *.sh files do not ever use crlf line endings locally. It seems in quick review that this is no longer the case?

@dcy2003
Copy link
Contributor Author

dcy2003 commented May 6, 2016

On Mac OSX or Linux nothing will use CRLF locally. Everything is normalized to LF within the repository and will be left that way. On Windows, the conversion to CRLF will occur locally when reading from the object database. Not sure that would be an issue, since we certainly aren't executing any BASH scripts on Windows... right? Take a look at the links I added to the ticket (referenced from the PR). I'm pretty confident what I've committed here is in line with best practice.

@rfecher
Copy link
Contributor

rfecher commented May 6, 2016

I intentionally ignore CRLF conversion for *.sh files because I think it is nice to ensure bash scripts stay correctly formatted. You can then run them in cygwin without having to manually convert and in particular because we do a lot with EMR, we don't have to manually convert them before putting them on S3 or scp'ing to a cluster. Its just an additional thing those working in windows environments have to be careful about when it seems unnecessary? For example, everytime you change branches git will change the line endings back to CRLF without it explicitly set in the .gitattributes and if you are using these scripts you have to then make sure you constantly manually change the line endings. For other files, like source code files you'd typically want this behavior, but for *.sh I can't really think of a reason you'd want CRLF even in Windows.

@dcy2003
Copy link
Contributor Author

dcy2003 commented May 6, 2016

Fair enough. I'll push another commit to leave the .sh handling as it was previously.

@rfecher rfecher merged commit f4cc536 into locationtech:0.9.1 May 8, 2016
@dcy2003 dcy2003 deleted the line-endings branch May 19, 2016 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants