Skip to content

View a RemoteGitIndex as of a particular commit. #77

@Eh2406

Description

@Eh2406

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions