Skip to content

Commit 21a1e15

Browse files
committed
Auto merge of #8561 - icorbrey:git-dep-lock-docs, r=ehuss
Emphasize git dependency version locking behavior. Added a section in `src/doc/src/reference/specifying-dependencies.md` clarifying Cargo's version locking behavior when adding `git` dependencies: ``` 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 `cargo update`. ``` Resolves #8555
2 parents b1d4a2e + 13e789e commit 21a1e15

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/doc/src/reference/specifying-dependencies.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ the latest commit on a branch named `next`:
147147
rand = { git = "https://github.com/rust-lang-nursery/rand", branch = "next" }
148148
```
149149

150+
Once a `git` dependency has been added, Cargo will lock that dependency to the
151+
latest commit at the time. New commits will not be pulled down automatically
152+
once the lock is in place. However, they can be pulled down manually with
153+
`cargo update`.
154+
150155
See [Git Authentication] for help with git authentication for private repos.
151156

152157
> **Note**: [crates.io] does not allow packages to be published with `git`
@@ -445,5 +450,3 @@ log-debug = ['foo/log-debug'] # using 'bar/log-debug' would be an error!
445450
}
446451
})();
447452
</script>
448-
449-

0 commit comments

Comments
 (0)