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

Add .gitattributes to prevent future EOL problems #88

Merged
merged 1 commit into from Feb 29, 2016

Conversation

champtar
Copy link
Contributor

my script was only converting mixed EOL (CRLF and LF),
6 files remains with CRLF only, please run
find -name '*.java' | xargs file | grep 'CRLF' | cut -d ':' -f1 | xargs -n1 dos2unix

@ibauersachs
Copy link
Member

I'm always a bit confused how .gitattributes actually works. Shouldn't this be *.java eol=lf?

@champtar
Copy link
Contributor Author

no, it will store LF inside git, but let you use CRLF on windows and LF on linux

@champtar
Copy link
Contributor Author

@ibauersachs
Copy link
Member

According to this link, it should be *.java text eol=lf. There is no reason to checkout files as CRLF, even on Windows.

@champtar
Copy link
Contributor Author

i'm not a windows user so i have no preferences here, we can force LF for *.java

@champtar
Copy link
Contributor Author

we can also add 'diff=java'

@ibauersachs
Copy link
Member

Not sure who else uses Windows, but I don't see the point of converting files to CRLF on checkout. It just makes it more likely to cause problems and except for Notepad all editors support LF anyway.

Adding diff is fine for me.

@champtar champtar force-pushed the gitattributes branch 3 times, most recently from f703afc to c69aa33 Compare February 24, 2016 11:44
@champtar
Copy link
Contributor Author

i've updated my PRs

@ibauersachs
Copy link
Member

This PR doesn't have the changes. Did you forget you push?

@champtar
Copy link
Contributor Author

Hi @ibauersachs,
It's impossible to review such changes, so I let you do the dos2unix

@ibauersachs
Copy link
Member

Yes, I was referring to the content of the .gitattributes file of libjitsi (the one for Jitsi is merged and I'll look at the mixed content there now).

@champtar
Copy link
Contributor Author

Sorry, i must have forget to push (tomorrow)

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
@champtar
Copy link
Contributor Author

hi @ibauersachs,
done

ibauersachs added a commit that referenced this pull request Feb 29, 2016
Add .gitattributes to prevent future EOL problems
@ibauersachs ibauersachs merged commit 535f4f6 into jitsi:master Feb 29, 2016
@champtar
Copy link
Contributor Author

don't forget to cleanup
find -name '*.java' | xargs file | grep 'CRLF' | cut -d ':' -f1 | xargs -n1 dos2unix

@champtar champtar deleted the gitattributes branch February 29, 2016 10:10
ibauersachs added a commit that referenced this pull request Feb 29, 2016
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.

None yet

2 participants