Skip to content

Commit f114298

Browse files
committed
Support vendoring with different revs from same git repo
Signed-off-by: Atkins Chang <atkinschang@gmail.com>
1 parent 0200d3b commit f114298

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cargo/ops/vendor.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ fn sync(
255255
let name = if source_id.is_crates_io() {
256256
CRATES_IO_REGISTRY.to_string()
257257
} else {
258-
source_id.url().to_string()
258+
// Remove `precise` since that makes the source name very long,
259+
// and isn't needed to disambiguate multiple sources.
260+
source_id.with_precise(None).as_url().to_string()
259261
};
260262

261263
let source = if source_id.is_crates_io() {

0 commit comments

Comments
 (0)