Skip to content

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

Merged
merged 1 commit into from
Oct 2, 2016
Merged

Conversation

TimNN
Copy link
Contributor

@TimNN TimNN commented Sep 30, 2016

if !submodule.path.exists() {
t!(fs::create_dir_all(&submodule.path));
t!(fs::create_dir_all(&submodule_path));
Copy link
Contributor Author

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 this
  • State::OutOfSync should have git create the directory when updating the submodule
  • State::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

Copy link
Contributor

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.

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Copy link
Contributor Author

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`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

current_dir (typo)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

@TimNN TimNN force-pushed the rustbuild-out-of-tree branch from a28f4d5 to 627463a Compare September 30, 2016 13:05
@TimNN TimNN force-pushed the rustbuild-out-of-tree branch from 627463a to 62fb242 Compare September 30, 2016 16:04
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Sep 30, 2016

📌 Commit 62fb242 has been approved by alexcrichton

@bors
Copy link
Collaborator

bors commented Oct 2, 2016

⌛ Testing commit 62fb242 with merge fe36876...

bors added a commit that referenced this pull request Oct 2, 2016
@bors bors merged commit 62fb242 into rust-lang:master Oct 2, 2016
@TimNN TimNN deleted the rustbuild-out-of-tree branch October 17, 2016 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants