I installed Rust following the instructions in the Rust Book. Everything seems to be working except that Cargo creates no git repository without me explicitly telling it to do so on the command line. The book indicates that the creation of the git repo should be the default. When I went looking for how to force the issue, all roads pointed to ~/.cargo/config. I see no such beastie anywhere on my system
Just to be clear, you're talking about this procedure, right?
And if so, the following:
cargo new hello_world --bin
ls -la hello_world
-rw-rw-r-- 1 adrian adrian 122 Oct 14 13:52 Cargo.toml
drwxrwxr-x 6 adrian adrian 180 Oct 14 13:52 .git
-rw-rw-r-- 1 adrian adrian 20 Oct 14 13:52 .gitignore
drwxrwxr-x 2 adrian adrian 60 Oct 14 13:52 src
I think it ought to create an empty stub for ~/.cargo/config, just to communicate to users that they've found the right path.
I mean, yeah, it's common for things like ~/.Xmodmap and ~/.pylintrc to not exist by default because they directly pollute your home directory; but ~/.cargo already exists for other reasons.
RE: Git repos, the only thing that comes to mind is that, if you're technically inside a repo (e.g. one of the parent directories is a repo), then it won't make one.
Well. That was terribly embarrassing. Months ago, I set up a folder for learning Rust, and had set it aside. Now that I'm finding time to get back to it, I went to that directory to continue with the book. What I did not remember, is that at the very top level of my ~/Learn/rust/ tree is that I had initialized a git repo. So, from within ~/Learn/rust, when I used cargo, I was indeed creating a cargo project within an existing Git repo.