-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Stop ignoring .rs.bk files; rustfmt hasn't generated them in years #7647
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
r? @Eh2406 (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Dec 2, 2019
Looks ok to me. @bors r+ |
📌 Commit 997a6d5 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Dec 2, 2019
bors
added a commit
that referenced
this pull request
Dec 2, 2019
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.
☀️ Test successful - checks-azure |
bors
added a commit
to rust-lang/rust
that referenced
this pull request
Dec 4, 2019
Update cargo 11 commits in 750cb1482e4d0e74822cded7ab8b3c677ed8b041..626f0f40efd32e6b3dbade50cd53fdfaa08446ba 2019-11-23 23:06:36 +0000 to 2019-12-03 16:53:04 +0000 - Change some texts to links in README (rust-lang/cargo#7652) - Update config and environment variable docs. (rust-lang/cargo#7650) - Stop ignoring .rs.bk files; rustfmt hasn't generated them in years (rust-lang/cargo#7647) - Various contributing docs updates. (rust-lang/cargo#7642) - Stabilize profile-overrides. (rust-lang/cargo#7591) - Update comment about ResolveVersion default version. (rust-lang/cargo#7637) - Update tests for slight wording change in rustdoc error message. (rust-lang/cargo#7641) - Remove dep_targets. (rust-lang/cargo#7626) - vendor: don't use canonical path in .cargo/config (rust-lang/cargo#7629) - Minor testsuite organization. (rust-lang/cargo#7628) - Remove failing plugin tests. (rust-lang/cargo#7630)
JohnTitor
added a commit
to JohnTitor/gitignore
that referenced
this pull request
Aug 9, 2020
This is no longer used by rustfmt anymore; see rust-lang/cargo#7647
5 tasks
berthj193
pushed a commit
to toptal/gitignore
that referenced
this pull request
Oct 1, 2020
This is no longer used by rustfmt anymore; see rust-lang/cargo#7647
jnqnfe
added a commit
to jnqnfe/term-ctrl-rust
that referenced
this pull request
Dec 4, 2020
jnqnfe
added a commit
to jnqnfe/gong
that referenced
this pull request
Dec 4, 2020
lovelypuppy0607
added a commit
to lovelypuppy0607/gitignore-1
that referenced
this pull request
May 11, 2023
This is no longer used by rustfmt anymore; see rust-lang/cargo#7647
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
. Seehttps://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.