]> git.proxmox.com Git - cargo.git/commit
Stop ignoring .rs.bk files; rustfmt hasn't generated them in years
authorJosh Triplett <josh@joshtriplett.org>
Mon, 2 Dec 2019 20:40:38 +0000 (12:40 -0800)
committerJosh Triplett <josh@joshtriplett.org>
Mon, 2 Dec 2019 20:40:38 +0000 (12:40 -0800)
commit997a6d5ab9051d207dc51e9b34a4af2b403c02f6
tree0f24c50ba2aefd39a3a5e04732c059740f0d77de
parentb35bb1b9b7587658dae176daa024463d095bbdba
Stop ignoring .rs.bk files; rustfmt hasn't generated them in years

cargo currently generates a .gitignore file that ignores .rs.bk files,
historically because rustfmt would sometimes generate such files.
However, rustfmt and cargo fmt don't generate backup files by default
(only when requested), and even when requested, they generate .bk files,
not .rs.bk files (as of rustfmt commit
fad903fd14ad0df045dc574cac0717312860c380 in 2017). And nobody seems to
have noticed or complained since then, likely because rustfmt doesn't
generate backup files by default.

rustfmt also plans to deprecate the --backup option entirely, in rustfmt
2.0, and instead always rely on version control to track changes.

In addition, these types of ignores, just like ignores of editor backup
files, don't belong in .gitignore; they belong in people's personal
ignore files, such as ~/.config/git/ignore.  See
https://julien.danjou.info/properly-managing-your-gitignore/ for further
explanation of that.

Given all three of those factors, drop the code to add **/*.rs.bk to
.gitignore, and update tests accordingly.
src/cargo/ops/cargo_new.rs
tests/testsuite/init.rs
tests/testsuite/new.rs