Skip to content
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

View a RemoteGitIndex as of a particular commit. #77

Open
Eh2406 opened this issue Dec 6, 2024 · 1 comment
Open

View a RemoteGitIndex as of a particular commit. #77

Eh2406 opened this issue Dec 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Eh2406
Copy link

Eh2406 commented Dec 6, 2024

Is your feature request related to a problem? Please describe.

I'm in the somewhat odd position of debugging/benchmarking cargoes resolver. I have a situation like "last month resolving foo-bar = "=0.1.0" took 0.1sec but it is now taking 3sec". Sometimes we can bisect through cargo to find what changed. But, sometimes what changed is the contents of the index. Like "three days ago the transitive dependency baz was yanked, and that is what cause things to get slower". It would be really useful to be able to use cargo bisect on the git repo that's holding the index.

Describe the solution you'd like
Add a new_at_refspec to RemoteGitIndex that did the same as new but skipped the search in find_remote_head and just used the ref provided.

Describe alternatives you've considered
I have considered using an outside tool to modify the git repo that RemoteGitIndex is pointing to. But the thorough search done by find_remote_head makes it hard to trick the program into using the commit I want.

Additional context
My debugging tool is https://github.com/Eh2406/pubgrub-crates-benchmark (and is still on crates-index but will switch for this feature).

@Eh2406 Eh2406 added the enhancement New feature or request label Dec 6, 2024
@Jake-Shadle
Copy link
Member

I'd accept a PR for this with a test, but I don't have time to work on this myself any time soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants