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
Moving from developing on MAC to Windows and hitting command:warning: LF will be replaced by CRLF in src/setup.cfg. #36
Comments
Which version are you using? There were very recently various improvements made on Windows but those haven't made it into a release yet. @c4urself is planning one soon though. |
0.5.8 |
This seems to be a general issue with windows v unix-style OSes' newline character. Could take a look at: https://stackoverflow.com/questions/5834014/lf-will-be-replaced-by-crlf-in-git-what-is-that-and-is-it-important |
This happens even when commit=false. I think bump2version should not change the kind of line endings. If a file uses LFs, it should still have LFs after being processed, even on Windows. |
You can use the following function to detect the newline representation of the file: def get_newline(filename):
with open(filename, "rb") as f:
while True:
c = f.read(1)
if not c or c == b'\n':
break
if c == b'\r':
if f.read(1) == b'\n':
return '\r\n'
return '\r'
return '\n' Then you can pass the output of this function to the |
Bump2version no longer modifies line-ending style as of #59. |
Throws this error.
Any ideas how to overcome?
The text was updated successfully, but these errors were encountered: