Skip to content

Changes to git submodules must be staged or commited to take effect #144077

@clubby789

Description

@clubby789

I used submodule set-{url,branch} to point src/llvm-project against my own fork. Confusingly, bootstrap kept reverting to the original commit.

let recorded = helpers::git(Some(&self.src))
.run_in_dry_run()
.args(["ls-tree", "HEAD"])
.arg(relative_path)
.run_capture_stdout(self)
.stdout();

recorded uses the current commit staged in git. I'm not sure if this is a bug, but it was a bit surprising and unintuitive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: `git`-related shenanigans (usually bootstrap related)C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions