Problem
cargo new in the root directory of a posix-like system (linux or macos) will fail with:
failed to make directory '/foo/.git': No such file or directory; class=Os (2)
Notes
cargo 1.37.0-nightly (807429e 2019-06-11)
This is caused by the update to libgit2, see libgit2/libgit2#5130 for more details.