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

Normalize line endings #2978

Merged
merged 2 commits into from Nov 21, 2014

Conversation

Projects
None yet
2 participants
@kfeuz
Contributor

kfeuz commented Nov 20, 2014

This partially addresses Issue #2955. I added a .gitattributes file which tells git to automatically recognize text files and normalize the line endings. It also ensures that .pde files and .java files are always treated as text. All of the previously un-normalized files are now normalized. You may be able to merge these file without all of the explicit changes by using the merge.renormalize option. I am not entirely certain on that though and how it works.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Nov 20, 2014

Member

These should both use Windows line-endings (they were incorrectly converted to native text in the PR)

build/macosx/jAppleMenuBar.url
build/windows/processing.bat

And per the description here is there not a way to do this that doesn't make the commit history look like you've rewritten the file?

Member

benfry commented Nov 20, 2014

These should both use Windows line-endings (they were incorrectly converted to native text in the PR)

build/macosx/jAppleMenuBar.url
build/windows/processing.bat

And per the description here is there not a way to do this that doesn't make the commit history look like you've rewritten the file?

@kfeuz

This comment has been minimized.

Show comment
Hide comment
@kfeuz

kfeuz Nov 21, 2014

Contributor

I have updated the .gitattributes file so that

build/macosx/jAppleMenuBar.url
build/windows/processing.bat

always use windows line endings on checkout.

I created a new branch and followed the steps in the previously linked article but it produced the same results of modifying the 30ish files with un-normalized line endings. According to this guide which I followed originally and this post which references the github instructions, the goal is to force git to recognize all of the line-changes immediately so they show up in the "right" commit instead of appearing later as different contributors merge their changes.

I tested cloning the textAuto branch on my linux system and now the only two files that have windows line endings are

build/macosx/jAppleMenuBar.url
build/windows/processing.bat

Contributor

kfeuz commented Nov 21, 2014

I have updated the .gitattributes file so that

build/macosx/jAppleMenuBar.url
build/windows/processing.bat

always use windows line endings on checkout.

I created a new branch and followed the steps in the previously linked article but it produced the same results of modifying the 30ish files with un-normalized line endings. According to this guide which I followed originally and this post which references the github instructions, the goal is to force git to recognize all of the line-changes immediately so they show up in the "right" commit instead of appearing later as different contributors merge their changes.

I tested cloning the textAuto branch on my linux system and now the only two files that have windows line endings are

build/macosx/jAppleMenuBar.url
build/windows/processing.bat

benfry added a commit that referenced this pull request Nov 21, 2014

@benfry benfry merged commit 41be537 into processing:master Nov 21, 2014

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Nov 21, 2014

Member

Cool, thanks for the help, and for looking into it. That's what I needed!

Member

benfry commented Nov 21, 2014

Cool, thanks for the help, and for looking into it. That's what I needed!

@kfeuz kfeuz deleted the kfeuz:textAuto branch Feb 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment