-
Notifications
You must be signed in to change notification settings - Fork 13.3k
fix out-of-tree rustbuild #36853
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
fix out-of-tree rustbuild #36853
Conversation
if !submodule.path.exists() { | ||
t!(fs::create_dir_all(&submodule.path)); | ||
t!(fs::create_dir_all(&submodule_path)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this?
State::NotInitialized
does not need thisState::OutOfSync
should have git create the directory when updating the submoduleState::MaybeDirty
should not need this (I think): If the submodule is dirty, it already exists. Also the code would be ineffectual, since it creates just the directory and does not set up the.git
metadata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, this shouldn't be required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was needed to land the PR, but probably because the PR itself was buggy, want to try removing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
// use `submodule.path` when e.g. executing a submodule specific command from the | ||
// repository root | ||
// use `submodule_path` when e.g. executing a normal git command for the submodule | ||
// (set via `currnet_dir`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current_dir (typo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks!
a28f4d5
to
627463a
Compare
627463a
to
62fb242
Compare
@bors: r+ |
📌 Commit 62fb242 has been approved by |
fix out-of-tree rustbuild See #36456 (comment) r? @alexcrichton
See #36456 (comment)
r? @alexcrichton