Skip to content

Allow the use of alternative registry names in [patch] #5149

Closed
@sfackler

Description

@sfackler

If you have an alternative registry configured and want to patch a crate in it, you currently have to spell out the entire URL:

.cargo/config

[registries.foobar]
index = "https://foobar.com/some-long-url/index"

Cargo.toml

...

[dependencies]
thingy = { version = "0.1", registry = "foobar" }

[patch."https://foobar.com/some-long-url/index"]
thingy = { git = "https://somewhere-else.com" }

But it's a bit annoying to have to write the whole URL around (and is the only place you're allowed to use the alternative registry URL directly in Cargo.toml). It'd be great if this worked instead:

[patch.foobar]
thingy = { git = "https://somewhere-else.com" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions