Skip to content
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

cargo init makes .gitignore without trailing newline #6846

Closed
BartMassey opened this issue Apr 14, 2019 · 5 comments
Closed

cargo init makes .gitignore without trailing newline #6846

BartMassey opened this issue Apr 14, 2019 · 5 comments
Labels
C-bug Category: bug

Comments

@BartMassey
Copy link
Contributor

Problem

The initial .gitignore created by cargo init does not end in a newline. This makes it annoying to append lines to it from the command line or via a text editor.

Steps

  1. cargo init --bin in an empty directory.

  2. Examine the resulting .gitignore.

Possible Solution

Add a newline.

Notes

Output of cargo version:

    cargo 1.34.0 (6789d8a0a 2019-04-01)

Debian Linux x86-64

@BartMassey BartMassey added the C-bug Category: bug label Apr 14, 2019
@fluffysquirrels
Copy link
Contributor

I can take a look at this.

@fluffysquirrels
Copy link
Contributor

The newline is present for me on master (currently 2510c0c) and using the nightly from 2019-04-14, so it looks like this was fixed already. Fix commit: 5a5d924 , fix PR: #6732 .

@fluffysquirrels
Copy link
Contributor

fluffysquirrels commented Apr 14, 2019

Looks like the patch is merged into the 1.35.0 branch (the newline test is present) and I can confirm that with the current cargo beta (cargo 1.35.0-beta (6f3e9c367 2019-04-04)) this works. All going well I think this will ship on the next stable 2019-04-11 + 6 weeks = 2019-05-23.

@BartMassey
Copy link
Contributor Author

Thanks!

@ehuss
Copy link
Contributor

ehuss commented Apr 16, 2019

Thanks for the investigation @fluffysquirrels !

@ehuss ehuss closed this as completed Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants