Closed akihito-takeuchi closed 7 years ago
Nothing.
I've tried all the tricks including what you've suggested and others - I've tried on OS X and Ubuntu (and even Windows), but I can never make git think there are changes to commit.
Can you PR the fix to line endings?
Git automatically changes the line ending when it restore the files in the local directory. The line ending of makemehapi.js may be changed, but git will never report it as the change to be committed.
If the line ending is CRLF, following command will show the lines in the file.
% grep "\r" makemehapi.js
I believe this command shows nothing now. You can test how .gitattributes file behaves with following steps. (Changing the line ending to 'CRLF', which will not work on my Mac)
% grep "\r" makemehapi.js
% git diff --- a/.gitattributes +++ b/.gitattributes @@ -3,7 +3,7 @@
# Explicitly declare text files we want to always be normalized and converted # to native line endings on checkout. -*.js text eol=lf +*.js text eol=crlf
% rm makemehapi.js % git checkout makemehapi.js
% git "\r" makemehapi.js
In the step 4, the command should print the contents of the file since the git restored the makemehapi.js with the line ending 'CRLF'.
In my understanding, the makemehapi.js should have the line ending 'LF' just before releasing the package through npm.
I updated the .gitattributes file to modify the line ending of .js files to 'LF'. Current release '5.2.1' has line ending problem in MacOS X. To fix this problem, I believe following steps are needed.