mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Document the use of rev
to depend on pull requests
This commit is contained in:
parent
19bb1df226
commit
86276d4ffe
@ -147,6 +147,13 @@ the latest commit on a branch named `next`:
|
||||
regex = { git = "https://github.com/rust-lang/regex", branch = "next" }
|
||||
```
|
||||
|
||||
Anything that is not a branch or tag falls under `rev`. This can be a commit
|
||||
hash like `rev = "4c59b707"`, or a named reference exposed by the remote
|
||||
repository such as `rev = "refs/pull/493/head"`. What references are available
|
||||
varies by where the repo is hosted; GitHub in particular exposes a reference to
|
||||
the most recent commit of every pull request as shown, but other git hosts often
|
||||
provide something equivalent, possibly under a different naming scheme.
|
||||
|
||||
Once a `git` dependency has been added, Cargo will lock that dependency to the
|
||||
latest commit at the time. New commits will not be pulled down automatically
|
||||
once the lock is in place. However, they can be pulled down manually with
|
||||
|
Loading…
x
Reference in New Issue
Block a user