Auto merge of #4649 - jongiddy:gitignore-newline, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 25 Oct 2017 06:42:27 +0000 (06:42 +0000)
committerbors <bors@rust-lang.org>
Wed, 25 Oct 2017 06:42:27 +0000 (06:42 +0000)
Add a newline before appended VCS ignore lines

The `cargo init` command appends to `.gitignore` or `.hgignore` without checking if the last line of the existing file ends with a newline.

This change will insert a newline before the appended lines. If the last line has no newline, this will ensure the lines are kept separated. If the newline is present, this will insert a blank line. Both Git and Mercurial ignore blank lines in these files.


Trivial merge