Skip to content

Commit

Permalink
Auto merge of #8561 - icorbrey:git-dep-lock-docs, r=ehuss
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Jul 29, 2020
2 parents b1d4a2e + 13e789e commit 21a1e15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/doc/src/reference/specifying-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ the latest commit on a branch named `next`:
rand = { git = "https://github.com/rust-lang-nursery/rand", branch = "next" }
```

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

See [Git Authentication] for help with git authentication for private repos.

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


0 comments on commit 21a1e15

Please sign in to comment.