Skip to content

Conversation

@treyhunner
Copy link
Contributor

I'm developing a script to check for inconsistencies in EditorConfig files and I noticed that yours has some problems.

The changes included in this pull request remove carriage returns from CRLF line endings that should be LF line endings (according to your EditorConfig file). The files modified all had mixed LF and CRLF line endings (which is no good at all).

Updated: this change also includes trimmed trailing whitespace and insertion of missing final newlines to various files.

@treyhunner
Copy link
Contributor Author

A diff ignoring whitespace demonstrates that no non-whitespace changes were made.

@thezoggy
Copy link

any way to fix the line ending without losing git blame history?

@treyhunner
Copy link
Contributor Author

Yes, but it involves rewriting history.

That would mean anyone that has a checked out version of the jquery-ui code would need need to check out a new copy since their history would disagree (or they could merge, but that would result in the same git blame issue).

You could also always git blame <revision-id>~1 <filename> to view the historical blame for the problematic lines.

As an alternative to accepting this pull request you could leave the files in their current inconsistent state and add exceptions to the .editorconfig file denoting unenforced line endings for these particular files.

@jzaefferer
Copy link
Member

I'm fine with just landing this as-is - we really don't care about the history of these files, we never edit them.

More interesting: Are you pushing this upstream to jquery/jquery as well? Adressing the issue at the source is certainly more important.

@treyhunner
Copy link
Contributor Author

Yes I opened jquery/jquery#952 to fix whitespace issues on jquery.

Interestingly my script didn't actually find any issues with the line endings used in jQuery (all seemed to by LF) but I found many trailing whitespace and missing final newline issues.

@treyhunner
Copy link
Contributor Author

@jzaefferer per your comment on #744 I added trailing whitespace and final newline fixes to this pull request.

@jzaefferer
Copy link
Member

Can you clean up your commit? I'm seeing a "ui/jquery.ui.autocomplete.js.orig" and similar that shouldn't be there. I guess in the end you should have equal amount of lines added and removed?

@treyhunner
Copy link
Contributor Author

Ah sorry about that. I did a blind git add ui/*.

Should be clean now.

@jzaefferer
Copy link
Member

Thanks, landed in 0bcbfe7 and 49f9b84

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

Labels

None yet

3 participants