-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustE-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.Relevant to the infrastructure team, which will review and decide on the PR/issue.
Description
When bootstrap updates a submodule, it performs a hard reset, discarding all local changes:
Lines 631 to 632 in 1481fd9
self.run(Command::new("git").args(&["reset", "-q", "--hard"]).current_dir(&absolute_path)); | |
self.run(Command::new("git").args(&["clean", "-qdfx"]).current_dir(absolute_path)); |
This was a nasty surprise when I was editing my local src/llvm-project
, and then did a git pull
and ./x.py build
.
Fortunately, I only had some extra debugging prints added, but there was no indication that my local changes would be overwritten.
We should require explicit confirmation before potentially deleting local changes like this.
wesleywiser, marmeladema and vincenzopalazzo
Metadata
Metadata
Assignees
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustE-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.Relevant to the infrastructure team, which will review and decide on the PR/issue.