cargo new and VSC inconsistency #13583
Labels
A-git
Area: anything dealing with git
C-bug
Category: bug
Command-new
S-triage
Status: This issue is waiting on initial triage.
Problem
In a intialized git repo, running cargo new
parent/project
creates a new git repository insideproject
if the parent folder is not already created. If the parent folder is already there then it doesn't create the git repository.Steps
git init
.cargo new test1
, you will see that the .git folder does not exist inside oftest1
cargo new parent/test2
, you will see that the .git folder does exist inside ofparent/test2
cargo new parent/test3
, you will see that the .git folder does not exist inside ofparent/test3
After running the commands it should look like this:

Running step 2 should not create a .git folder but it does because the parent folder has not been created.
This also does the same thing if more than one parent
Possible Solution(s)
I am assuming that if the parent folder is not created, cargo intializes a repo, so the solution would be to not do that so that it is consistent with cargo new without a path
Notes
No response
Version
The text was updated successfully, but these errors were encountered: