Closed as not planned
Description
Problem
When running cargo init
in an existing git repository, cargo adds a /target
line to .gitignore
, regardless of whether that line is already present.
Proposed Solution
After checking if the .gitignore
file exists, scan the lines to search for a /target
, target/
or */taget
line.
Notes
cargo -vV
output:
cargo 1.68.0 (115f34552 2023-02-26)
release: 1.68.0
commit-hash: 115f34552518a2f9b96d740192addbac1271e7e6
commit-date: 2023-02-26
host: aarch64-apple-darwin
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.79.1 (sys:0.4.59+curl-7.86.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
os: Mac OS 12.5.1 [64-bit]