[jitsi-dev] [libjitsi] Add .gitattributes to prevent future EOL problems (#88)


#1

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

You can view, comment on, or merge this pull request online at:

  https://github.com/jitsi/libjitsi/pull/88

-- Commit Summary --

  * Add .gitattributes to prevent future EOL problems

-- File Changes --

    A .gitattributes (1)

-- Patch Links --

https://github.com/jitsi/libjitsi/pull/88.patch
https://github.com/jitsi/libjitsi/pull/88.diff

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88


#2

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

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-188179240


#3

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

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-188180752


#4

https://help.github.com/articles/dealing-with-line-endings/

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-188181041


#5

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

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-188187867


#6

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

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-188189025


#7

we can also add 'diff=java'

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-188189435


#8

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.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-188197908


#9

i've updated my PRs

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-188215784


#10

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

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-189921574


#11

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

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-189942139


#12

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).

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-189942859


#13

Sorry, i must have forget to push (tomorrow)

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-189951442


#14

hi @ibauersachs,
done

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-190117105


#15

Merged #88.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#event-570747885


#16

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

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/88#issuecomment-190132186