Skip to content

Clean up .gitignore #84374

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Apr 23, 2021
Merged

Clean up .gitignore #84374

merged 2 commits into from
Apr 23, 2021

Conversation

CDirkx
Copy link
Contributor

@CDirkx CDirkx commented Apr 20, 2021

Categorizes entries in the .gitignore file.

Other changes:

  • added desktop.ini (Windows equivalent of .DS_Store)
  • removed .hg/ and .hgignore

@rust-highfive
Copy link
Contributor

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 20, 2021
.gitignore Outdated
/dist/
/obj/
/unicode-downloads/
/target/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a trailing slash for consistency, or does that change anything?

Copy link
Member

@jyn514 jyn514 Apr 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a separator at the end of the pattern then the pattern will only match directories, otherwise the pattern can match both files and directories.

I think only matching directories is correct.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping a trailing slash is needed to support symlinks, and that's what cargo generates by default.
I recommend reverting the addition of a trailing slash.

See also rust-lang/cargo#4944, #70409

When target is a symlink (e.g., to keep build outputs on a separate
partition), Git will not match the /target/ ignore to the symlink
since it is not a directory. Drop the trailing slash to support ignoring
target as a symlink.

@Mark-Simulacrum
Copy link
Member

r=me if this doesn't change anything other than the windows file, which I think is the case but there's some reshuffling which makes comparison hard.

@CDirkx
Copy link
Contributor Author

CDirkx commented Apr 22, 2021

The windows file is added, and the Mercurial entries are removed. Other than that all entries are unchanged, only reordered.

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

I'll admit I'm not sure this cleanup is really worth the possible risk of getting it wrong, but it doesn't seem too bad.

@bors
Copy link
Collaborator

bors commented Apr 22, 2021

📌 Commit c0d05d2 has been approved by Mark-Simulacrum

@bors 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 Apr 22, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 23, 2021
Clean up .gitignore

Categorizes entries in the `.gitignore` file.

Other changes:
- added `desktop.ini` (Windows equivalent of `.DS_Store`)
- removed `.hg/` and `.hgignore`
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 23, 2021
Clean up .gitignore

Categorizes entries in the `.gitignore` file.

Other changes:
- added `desktop.ini` (Windows equivalent of `.DS_Store`)
- removed `.hg/` and `.hgignore`
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 23, 2021
Clean up .gitignore

Categorizes entries in the `.gitignore` file.

Other changes:
- added `desktop.ini` (Windows equivalent of `.DS_Store`)
- removed `.hg/` and `.hgignore`
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2021
Rollup of 11 pull requests

Successful merges:

 - rust-lang#80805 (Improve `Iterator::by_ref` example)
 - rust-lang#84248 (Remove duplicated fn(Box<[T]>) -> Vec<T>)
 - rust-lang#84321 (rustdoc: Convert sub-variant toggle to HTML)
 - rust-lang#84359 (:arrow_up: rust-analyzer)
 - rust-lang#84374 (Clean up .gitignore)
 - rust-lang#84387 (Move `sys_common::poison` to `sync::poison`)
 - rust-lang#84430 (doc/platform-support: clarify UEFI support)
 - rust-lang#84433 (Prevent control, shift and alt keys to make search input lose focus)
 - rust-lang#84444 (doc: Get rid of "[+] show undocumented items" toggle on numeric From impls)
 - rust-lang#84456 (Fix ICE if original_span(fn_sig) returns a span not in body sourcefile)
 - rust-lang#84469 (Update comment on `PrimTy::name_str`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8de00b3 into rust-lang:master Apr 23, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 23, 2021
@CDirkx CDirkx deleted the gitignore branch April 24, 2021 06:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants