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

Added .gitattributes file for proper line endings. #712

Merged
merged 1 commit into from Oct 15, 2014

Conversation

Projects
None yet
3 participants
@TankOs
Member

TankOs commented Oct 5, 2014

No description provided.

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Oct 6, 2014

Member

The export-ignore doesn't seem to work for me...

Member

eXpl0it3r commented Oct 6, 2014

The export-ignore doesn't seem to work for me...

@TankOs

This comment has been minimized.

Show comment
Hide comment
@TankOs

TankOs Oct 7, 2014

Member

Can you try with extlibs/**/*, extlibs/* or /extlibs?

Member

TankOs commented Oct 7, 2014

Can you try with extlibs/**/*, extlibs/* or /extlibs?

@eXpl0it3r eXpl0it3r added this to the 2.2 milestone Oct 11, 2014

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Oct 11, 2014

Member

Since nobody cared to further investigate this, I did. 😉

export-ignore seems to be only for archives, instead one simply has to remove the previously set attributes, like this (also note that directories need to have a slash):

* text=auto eol=lf

extlibs/ -text -eol
src/SFML/Graphics/stb_image -text -eol
Member

eXpl0it3r commented Oct 11, 2014

Since nobody cared to further investigate this, I did. 😉

export-ignore seems to be only for archives, instead one simply has to remove the previously set attributes, like this (also note that directories need to have a slash):

* text=auto eol=lf

extlibs/ -text -eol
src/SFML/Graphics/stb_image -text -eol

@eXpl0it3r eXpl0it3r self-assigned this Oct 11, 2014

@eXpl0it3r eXpl0it3r removed the s:unassigned label Oct 11, 2014

@TankOs

This comment has been minimized.

Show comment
Hide comment
@TankOs

TankOs Oct 13, 2014

Member

Thanks. I've also added "*/" to the end of the pattern, otherwise it didn't work for me. I've also rebased the PR onto master.

It would be nice, though, if you could test it once again.

Member

TankOs commented Oct 13, 2014

Thanks. I've also added "*/" to the end of the pattern, otherwise it didn't work for me. I've also rebased the PR onto master.

It would be nice, though, if you could test it once again.

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Oct 13, 2014

Member

Seems to work here. Does anyone else have the time to test this?

Member

eXpl0it3r commented Oct 13, 2014

Seems to work here. Does anyone else have the time to test this?

@mantognini

This comment has been minimized.

Show comment
Hide comment
@mantognini

mantognini Oct 13, 2014

Member

dumb question: how do you test it? I just have no idea what to look for so..

Member

mantognini commented Oct 13, 2014

dumb question: how do you test it? I just have no idea what to look for so..

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Oct 13, 2014

Member
  • Create a new and empty Git repository.
  • Add the .gitattributes from this PR to it.
  • Create the repository extlibs and if you want a subdirectory with it.
  • Add one file with CRLF line endings in the extlibs directory (or its subdirectories).
  • Add one file with CRLF line endings to the root directory.
  • Make a commit and see, if Git tells you that CRLF line endings will be changed into LF line endings for the file in the root dir, while the ones in the extlibs should not be touched.
Member

eXpl0it3r commented Oct 13, 2014

  • Create a new and empty Git repository.
  • Add the .gitattributes from this PR to it.
  • Create the repository extlibs and if you want a subdirectory with it.
  • Add one file with CRLF line endings in the extlibs directory (or its subdirectories).
  • Add one file with CRLF line endings to the root directory.
  • Make a commit and see, if Git tells you that CRLF line endings will be changed into LF line endings for the file in the root dir, while the ones in the extlibs should not be touched.
@TankOs

This comment has been minimized.

Show comment
Hide comment
@TankOs

TankOs Oct 14, 2014

Member

...or remove and re-add the last two lines of the .gitattributes file and see what happens by running "git status" each time you do a change. ;)

Member

TankOs commented Oct 14, 2014

...or remove and re-add the last two lines of the .gitattributes file and see what happens by running "git status" each time you do a change. ;)

@eXpl0it3r eXpl0it3r merged commit e2c378e into master Oct 15, 2014

@eXpl0it3r eXpl0it3r deleted the feature/gitattributes branch Oct 15, 2014

@TankOs

This comment has been minimized.

Show comment
Hide comment
@TankOs

TankOs Oct 15, 2014

Member

❤️ 🐈

Member

TankOs commented Oct 15, 2014

❤️ 🐈

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