Skip to content
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

Search upward if the path does not exist when cargo new #10987

Closed
wants to merge 1 commit into from

Conversation

Rustin170506
Copy link
Member

Try to Search upward if the path does not exist when cargo new.

What does this PR try to resolve?

close #10981

How should we test and review this PR?

Run the unit test or try the case which comes from the issue.

@rust-highfive
Copy link

r? @ehuss

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 14, 2022
// Try to find the first existing parent of the path.
// Otherwise, we can't find the git repo when the path has non-existing parent directories.
let mut first_exist_base_path = Some(path);
while let Some(p) = first_exist_base_path {
Copy link
Contributor

Choose a reason for hiding this comment

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

See instead libgit2/libgit2#6383

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. See instead #10981 (comment).

@weihanglo weihanglo added S-blocked and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 27, 2022
@weihanglo weihanglo marked this pull request as draft April 18, 2023 21:56
@weihanglo weihanglo added S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix and removed S-blocked labels Apr 18, 2023
@weihanglo
Copy link
Member

Hello. I am going to close this, as we agree on waiting for an upstream fix, and this is not really a severe bug. Thank you for the patch anyway.

@weihanglo weihanglo closed this Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo new failed to detect vcs if parent of path does not exist
5 participants