-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With submodules=true, using ./x.py fmt
as a git hook makes bootstrap delete all submodules
#125954
Comments
I think this only happens with worktrees. I attempted to reproduce it about 25 times without success. |
Yes indeed, this does not happen in my |
Adding some debug logging, it seems like some truly strange things are happening...
This is the HEAD commit of the outer repository! I think what's happening is that some environment variables are set inside the git hook which overwrite the |
Due to rust-lang#125954, we had to modify git invocations with certain flags in rust-lang#126255. However, because there are so many instances of `Command::new("git")` in bootstrap, it is difficult to apply these solutions to all of them. This PR creates a helper function that unifies the git usage in bootstrap. Meaning, whenever special flags or hacks are needed, we can apply them to this single function which makes things much simpler for the bootstrap team. Signed-off-by: onur-ozkan <[email protected]>
Due to rust-lang#125954, we had to modify git invocations with certain flags in rust-lang#126255. However, because there are so many instances of `Command::new("git")` in bootstrap, it is difficult to apply these solutions to all of them. This PR creates a helper function that unifies the git usage in bootstrap. Meaning, whenever special flags or hacks are needed, we can apply them to this single function which makes things much simpler for the bootstrap team. Signed-off-by: onur-ozkan <[email protected]>
Due to rust-lang#125954, we had to modify git invocations with certain flags in rust-lang#126255. However, because there are so many instances of `Command::new("git")` in bootstrap, it is difficult to apply these solutions to all of them. This PR creates a helper function that unifies the git usage in bootstrap. Meaning, whenever special flags or hacks are needed, we can apply them to this single function which makes things much simpler for the bootstrap team. Signed-off-by: onur-ozkan <[email protected]>
…r=Kobzol unify git command preperation Due to rust-lang#125954, we had to modify git invocations with certain flags in rust-lang#126255. However, because there are so many instances of `Command::new("git")` in bootstrap, it is difficult to apply these solutions to all of them. This PR creates a helper function that unifies the git usage in bootstrap. Meaning, whenever special flags or hacks are needed, we can apply them to this single function which makes things much simpler for the bootstrap team.
Rollup merge of rust-lang#126309 - onur-ozkan:unify-git-utilization, r=Kobzol unify git command preperation Due to rust-lang#125954, we had to modify git invocations with certain flags in rust-lang#126255. However, because there are so many instances of `Command::new("git")` in bootstrap, it is difficult to apply these solutions to all of them. This PR creates a helper function that unifies the git usage in bootstrap. Meaning, whenever special flags or hacks are needed, we can apply them to this single function which makes things much simpler for the bootstrap team.
Rollup merge of rust-lang#126255 - RalfJung:bootstrap-submodules, r=onur-ozkan fix checking git submodules during a commit hook Fixes rust-lang#125954 The one thing that still puzzles me is why this only is a problem with worktrees. r? `@onur`
To reproduce, I am in a worktree without
.git
(i.e., not the "main" worktree). I have a pre-commit hook set up as followsNow I change something trivial (e.g. remove a trailing
.
in some comments) and commit. That does the followingAfter a second or two I get suspicious and hit Ctrl-C. Now it looks like bootstrap has done something with the (previously clean) cargo submodule
So let's
cd src/tools/cargo
and see what's upEh... so the added files are rustc files? Why are those being added in
src/tools/cargo
?Something is going seriously wrong here.
The text was updated successfully, but these errors were encountered: