-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-gitArea: anything dealing with gitArea: anything dealing with gitC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Description
Describe the problem you are trying to solve
Adding a patch section referring to a reference that is not a branch or tag of the repository. For example refs/pull/<id>/head
to refer to a pull request on Github.
Describe the solution you'd like
An additional ref
key to go with branch
, tag
and rev
that allows passing in a fully-qualified reference to lookup.
Notes
This may be slightly complicated as it appears that Cargo does a fetch of just refs/heads/*:refs/heads/*
before looking up the specified branch locally. It might be better in any case to only fetch the requested ref from the remote to reduce traffic on repositories that have a large number of branches.
yihuang
Metadata
Metadata
Assignees
Labels
A-gitArea: anything dealing with gitArea: anything dealing with gitC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Nemo157 commentedon Aug 9, 2019
What I mention in the note would also allow accessing revisions that are not ancestors of any public branch/tag as long as they are accessible in the remote repository. Basically performing a
git fetch <repository> <rev>
orgit fetch <repository> <ref>:<ref>
to only pull the single commit and ancestors before looking it up locally.ehuss commentedon Jan 4, 2022
This should now be implemented (via #9859 now in 1.57) to fetch any ref with the syntax
rev="refs/..."
:I'm going to close as resolved, though feel free to reopen if I have misinterpreted the request.