Skip to content

Cargo should not run git gc manually #8195

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

Closed
glandium opened this issue May 2, 2020 · 2 comments
Closed

Cargo should not run git gc manually #8195

glandium opened this issue May 2, 2020 · 2 comments
Labels
A-git Area: anything dealing with git C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@glandium
Copy link
Contributor

glandium commented May 2, 2020

Saw this on twitter:
https://twitter.com/indygreg/status/1256656752944111616
and it turns out
a) cargo is checking how many packs there are on its own
b) if there are too many, it runs git gc, which is blocking.

There is a git command to do both of that automatically, with b) being done in the background, not blocking anything else: git gc --auto. The maybe_gc_repo function should just call that unconditionally. This also has the advantage of respecting the various gc.* git config items, instead of a manual __CARGO_PACKFILE_LIMIT.

@glandium glandium added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label May 2, 2020
@matthiaskrgr
Copy link
Member

Duplicate of #4495 ?

glandium added a commit to glandium/cargo that referenced this issue May 14, 2020
@ehuss ehuss added the A-git Area: anything dealing with git label May 23, 2020
@epage
Copy link
Contributor

epage commented Nov 4, 2023

Closing in favor of #4495 so we consolidate the conversation on this.

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-git Area: anything dealing with git C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants