-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
move file-extension based .gitignore down to src/ #53768
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ rollup no strong opinion here |
📌 Commit 6628d39 has been approved by |
move file-extension based .gitignore down to src/ Currently, it for example ignores `*.rlib` files in the repository root -- which I think is wrong; I sometimes get these files when I call rustc directly and I do want them cleaned up, not ignored. No such files are created during the normal build process.
At the risk of commenting without fully understanding what's going on here: I find this confusing -- doesn't it effectively say that you want git to track changes in the repo root for files with these extensions? Meaning, with this change running |
move file-extension based .gitignore down to src/ Currently, it for example ignores `*.rlib` files in the repository root -- which I think is wrong; I sometimes get these files when I call rustc directly and I do want them cleaned up, not ignored. No such files are created during the normal build process.
That is correct; on the other hand, Maybe I was hasty in r+'ing, though, and should have done a broader survey. My bad. cc @rust-lang/compiler @rust-lang/libs and other people who hack on this repo. Do you have opinions? :) |
I don’t mind this change. I doubt people with a habit of littering around their repository will be using |
move file-extension based .gitignore down to src/ Currently, it for example ignores `*.rlib` files in the repository root -- which I think is wrong; I sometimes get these files when I call rustc directly and I do want them cleaned up, not ignored. No such files are created during the normal build process.
The way I use git (and, from my experience, the way it is frequently used), I wasn't aware people would do |
Yeah, I actually would be pretty surprised if anyone used It makes sense to only ignore files which are expected to be created! Thanks for humoring me. :) |
move file-extension based .gitignore down to src/ Currently, it for example ignores `*.rlib` files in the repository root -- which I think is wrong; I sometimes get these files when I call rustc directly and I do want them cleaned up, not ignored. No such files are created during the normal build process.
Rollup of 20 pull requests Successful merges: - #51760 (Add another PartialEq example) - #53113 (Add example for Cow) - #53129 (remove `let x = baz` which was obscuring the real error) - #53389 (document effect of join on memory ordering) - #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.) - #53476 (Add partialeq implementation for TryFromIntError type) - #53513 (Force-inline `shallow_resolve` at its hottest call site.) - #53655 (set applicability) - #53702 (Fix stabilisation version for macro_vis_matcher.) - #53727 (Do not suggest dereferencing in macro) - #53732 (save-analysis: Differentiate foreign functions and statics.) - #53740 (add llvm-readobj to llvm-tools-preview) - #53743 (fix a typo: taget_env -> target_env) - #53747 (Rustdoc fixes) - #53753 (expand keep-stage --help text) - #53756 (Fix typo in comment) - #53768 (move file-extension based .gitignore down to src/) - #53785 (Fix a comment in src/libcore/slice/mod.rs) - #53786 (Replace usages of 'bad_style' with 'nonstandard_style'.) - #53806 (Fix UI issues on Implementations on Foreign types) Failed merges: r? @ghost
☔ The latest upstream changes (presumably #53832) made this pull request unmergeable. Please resolve the merge conflicts. |
Oh no.
I often call rustc directly too, like this or similar
and I want the produced files to be ignored, so they do not litter git-gui or git status.
In my case this is expected temporary data in the repository, exactly something that needs to be ignored. |
@petrochenkov maybe you can edit your |
gitignore: add comment explaining policy Based on rust-lang#63307 (comment), I added a comment what I think should be gitignored and what not. This is just a proposal, obviously. Also see rust-lang#53768 for some more discussion. The summary is that if there are junk files that you create locally and are fine leaving around (such as `mir_dump`), git has the option for you to add them to `.git/info/exclude`. Others might prefer to keep their working dir clean of those same junk files, so we shouldn't just ignore them for everyone. I then also cleaned up a few more things, but there were many things that I had no idea where they came from so I didn't touch them.
gitignore: add comment explaining policy Based on rust-lang#63307 (comment), I added a comment what I think should be gitignored and what not. This is just a proposal, obviously. Also see rust-lang#53768 for some more discussion. The summary is that if there are junk files that you create locally and are fine leaving around (such as `mir_dump`), git has the option for you to add them to `.git/info/exclude`. Others might prefer to keep their working dir clean of those same junk files, so we shouldn't just ignore them for everyone. I then also cleaned up a few more things, but there were many things that I had no idea where they came from so I didn't touch them.
…um,Centril keep the root dir clean from debugging We landed this before with rust-lang#63307 but recently in rust-lang#65630 the IMO bad ignore crept back in. If you regularly do graphviz-based debugging and you are fine leaving junk in the rustc root dir, please configure your local `.git/info/exclude`. But most people working on rustc don't work with graphciz all that often (I for once never did), and not everyone likes to have stray generated files in their source dirs. Also Cc rust-lang#63373 rust-lang#53768 @ecstatic-morse @Mark-Simulacrum
…um,Centril keep the root dir clean from debugging We landed this before with rust-lang#63307 but recently in rust-lang#65630 the IMO bad ignore crept back in. If you regularly do graphviz-based debugging and you are fine leaving junk in the rustc root dir, please configure your local `.git/info/exclude`. But most people working on rustc don't work with graphciz all that often (I for once never did), and not everyone likes to have stray generated files in their source dirs. Also Cc rust-lang#63373 rust-lang#53768 @ecstatic-morse @Mark-Simulacrum
Currently, it for example ignores
*.rlib
files in the repository root -- which I think is wrong; I sometimes get these files when I call rustc directly and I do want them cleaned up, not ignored. No such files are created during the normal build process.