From: Guillaume Gomez Date: Sat, 9 Dec 2017 15:30:25 +0000 (+0100) Subject: Add precision on overriding a repository [patch] X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~3^2~51^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b21dce3513d5fc4cbe12d7c203fc761cd378c666;p=cargo.git Add precision on overriding a repository [patch] --- diff --git a/src/doc/src/reference/specifying-dependencies.md b/src/doc/src/reference/specifying-dependencies.md index e58fa915c..7fb0225d8 100644 --- a/src/doc/src/reference/specifying-dependencies.md +++ b/src/doc/src/reference/specifying-dependencies.md @@ -332,6 +332,17 @@ the new `uuid` crate applies to *both* our dependency on `uuid` and the version for this entire crate graph, 1.0.1, and it'll be pulled from the git repository. +#### Overriding repository URL + +In case the dependency you want to override isn't loaded from `crates.io`, you'll have to change a bit how you use `[patch]`: + +``` +[patch."https://github.com/your/repository"] +my-library = { path = "../my-library/path" } +``` + +And that's it! + ### Prepublishing a breaking change As a final scenario, let's take a look at working with a new major version of a