Using version control systems I get annoyed at the noise when the diff says No newline at end of file.
So I was wondering: How to add a newline at the end of a file to get rid off those messages?
|
Using version control systems I get annoyed at the noise when the diff says So I was wondering: How to add a newline at the end of a file to get rid off those messages? |
||||
|
|
This adds
|
|||||||||||||||||
|
|
Have a look:
so edit removed the |
|||||||
|
|
You're better off correcting the editor of the user who last edited the file. If you are the last person to have edited the file - what editor are you using, I'm guessing textmate ..? |
|||||||||
|
|
Another solution using
It essentially works opening the file for editing through a script, the script is the single
LIMITATIONS
(...)
If a text (non-binary) file is not terminated by a newline character,
then ed appends one on reading/writing it. In the case of a binary
file, ed does not append a newline on reading/writing.
|
||||
|
|