Skip to content

Force LF line endings for the dist files.#11674

Closed
XhmikosR wants to merge 1 commit into
twbs:masterfrom
XhmikosR:line-endings
Closed

Force LF line endings for the dist files.#11674
XhmikosR wants to merge 1 commit into
twbs:masterfrom
XhmikosR:line-endings

Conversation

@XhmikosR

@XhmikosR XhmikosR commented Dec 2, 2013

Copy link
Copy Markdown
Member

This should make things more consistent on all platforms.

/CC @cvrebert

This should make things more consistent on all platforms.
@XhmikosR

XhmikosR commented Dec 2, 2013

Copy link
Copy Markdown
Member Author

Apparently the banner already has CRLF and we still end up with mixed line endings.

[line-endings 30da1cd] sss
 3 files changed, 4 insertions(+), 3 deletions(-)
warning: CRLF will be replaced by LF in dist/css/bootstrap.css.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in dist/css/bootstrap.min.css.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in dist/js/bootstrap.min.js.
The file will have its original line endings in your working directory.

@XhmikosR

XhmikosR commented Dec 2, 2013

Copy link
Copy Markdown
Member Author

I'm out of ideas unfortunately. Unless we have the tools output consistent line endings we'll always have this issue with git's autocrlf set to true.

@cvrebert

cvrebert commented Dec 2, 2013

Copy link
Copy Markdown
Collaborator

I think Grunt has some config options for this; I'll look into it.

@zlatanvasovic

Copy link
Copy Markdown

@XhmikosR Hum, how? Look at banner code, it's just with \n, without \r.

@zlatanvasovic

Copy link
Copy Markdown

@XhmikosR

XhmikosR commented Dec 3, 2013

Copy link
Copy Markdown
Member Author

@zdroid: you can try yourself. The banner will have CRLF while the rest of the lines will have LF.

@XhmikosR

XhmikosR commented Dec 3, 2013

Copy link
Copy Markdown
Member Author

@zdroid grunt-lineending looks promising I guess as long as @cvrebert doesn't mind adding yet another grunt plugin. If we can't do it natively without a plugin I suppose it's the only solution.

@zlatanvasovic

Copy link
Copy Markdown

I know, but that's it.

2013/12/3 XhmikosR notifications@github.com

@zdroid https://github.com/ZDroid grunt-lineending looks promising I
guess as long as @cvrebert https://github.com/cvrebert doesn't mind
adding yet another grunt plugin. If we can't do it natively without a
plugin I suppose it's the only solution.


Reply to this email directly or view it on GitHubhttps://github.com//pull/11674#issuecomment-29689347
.

Zlatan Vasović - ZDroid

@tlindig

tlindig commented Dec 3, 2013

Copy link
Copy Markdown
Contributor

@cvrebert

I think Grunt has some config options for this; I'll look into it.

Thats funny, I just had the same problem.
Yes, grunt has an option for that.
see here: #11687

@tlindig

tlindig commented Dec 3, 2013

Copy link
Copy Markdown
Contributor

@XhmikosR

you can try yourself. The banner will have CRLF while the rest of the lines will have LF.

That is, because grunt pay attention to the platform specific line feed char. You will get this result only on windows platforms. I do not know why they do this, that have not benefit. But they do it.

If you precess a file with the templating engine, they will add this linefeed. But you can set it to a fix value.

@cvrebert

cvrebert commented Dec 3, 2013

Copy link
Copy Markdown
Collaborator

Superseded by #11687 & f2dab82.

@cvrebert cvrebert closed this Dec 3, 2013
@XhmikosR XhmikosR deleted the line-endings branch December 3, 2013 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants