rust-lang / rust-lang/cargo

Allow non-master branch for alternative registry index to facilitate development and testing

Open
#7,329 23 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-registries C-feature-request S-needs-design
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

Now that Cargo alternative registries have been stabilized, they are configured as:

[registries]
my-registry = { index = "https://my-intranet:8080/git/index" }

Currently, Cargo uses the master branch by default, which makes development & testing difficult as it interferes with the master which is used in the production. So it'd be good if Cargo allows us to use non-master branch as well:

[registries]
my-registry = { index = "https://my-intranet:8080/git/index",  branch = "dev" }

where branch could be an optional field whose default value is master to be backward-compatible.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by tracing Cargo's alternative-registry configuration and Git index handling; add an optional registry branch while preserving master as the default, then add or update tests showing both the default and configured branch behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.