YaleSTC / shifts

Application to easily track shifts, reports, and payforms for employees.
MIT License
23 stars 18 forks source link

Line ending fixes #297

Closed jasonkliu closed 10 years ago

jasonkliu commented 10 years ago

Basically I had problems on master because png/jpg were not treated as binary so they had different line ending issues (crlf vs lf). I made the gitignore on master the same as the one on rails-3.2, which seems to work. However, there is one difference:

rails-3.2: * text=auto master: * text=lf

It needs to be the latter so that text files don't preserve different line endings. https://help.github.com/articles/dealing-with-line-endings

mnquintana commented 10 years ago

Interestingly this caused a whole new set of issues for me - git status tells me that the following files are modified:

    modified:   app/views/layouts/payforms.html.erb
    modified:   app/views/payforms/_date_select.html.erb
    modified:   public/images/floatbox/en.json
    modified:   public/images/floatbox/loading_iframe.html
    modified:   public/images/icons/led_icons/1license.txt
    modified:   public/images/icons/led_icons/readme.txt

But I haven't modified anything. Plus, I can't stash the changes or switch to a new branch, and rm & re-cloning has only made the list of "modified" files longer.

jasonkliu commented 10 years ago

Okay, let's revert for now. (3332ad50284e037a16cf9704a6684dae199b6546)

mnquintana commented 10 years ago

Ah I see what it is now - git was converting these files to LF line endings, hence the modified state. We actually do want that, so uh, revert the revert - sorry!