Skip to content

cargo new creates a weird _git2 symlink #7173

Closed
@akatechis

Description

@akatechis

Problem
I'm not sure if it's even a bug, but I am running on Windows 10 Pro. I use Git Bash, as my "terminal", and when I create a new rust binary project, along with all the expected files/directories, I get what looks like a weird link file to some sort of testing file/dir.

If I try to open that link as a directory, I get an error that it doesn't exist. Is this some temporary working directory that is not being cleaned up?

Steps
With the below versions of cargo/git, issue the following commands:

  1. cargo new foo.
  2. cd foo
  3. ls -l

Notes
Here's the relevant transcript of commands indicating what I see, and the versions of relevant tools:

$ cargo --version
cargo 1.37.0-nightly (4c1fa54d1 2019-06-24)

$ rustc --version
rustc 1.37.0-nightly (0af8e872e 2019-06-30)

$ rustup --version
rustup 1.18.3 (435397f48 2019-05-22)

$ ll
total 18
drwxr-xr-x 1 alex.katechis 1049089   0 Jul 24 09:57 ./
drwxr-xr-x 1 alex.katechis 1049089   0 Jul 24 09:56 ../
drwxr-xr-x 1 alex.katechis 1049089   0 Jul 24 09:56 .git/
-rw-r--r-- 1 alex.katechis 1049089  19 Jul 24 09:56 .gitignore
lrwxrwxrwx 1 alex.katechis 1049089   7 Jul 24 09:56 _git2_a08784 -> testing
-rw-r--r-- 1 alex.katechis 1049089 244 Jul 24 09:56 Cargo.toml
drwxr-xr-x 1 alex.katechis 1049089   0 Jul 24 09:56 src/

# Then I run `rustup update` to get the latest nightly...

$ ll
total 18
drwxr-xr-x 1 alex.katechis 1049089   0 Jul 24 10:03 ./
drwxr-xr-x 1 alex.katechis 1049089   0 Jul 24 10:03 ../
drwxr-xr-x 1 alex.katechis 1049089   0 Jul 24 10:03 .git/
-rw-r--r-- 1 alex.katechis 1049089  19 Jul 24 10:03 .gitignore
lrwxrwxrwx 1 alex.katechis 1049089   7 Jul 24 10:03 _git2_a02928 -> testing
-rw-r--r-- 1 alex.katechis 1049089 240 Jul 24 10:03 Cargo.toml
drwxr-xr-x 1 alex.katechis 1049089   0 Jul 24 10:03 src/

$ cargo --version
cargo 1.38.0-nightly (e3563dbdc 2019-07-16)

$ rustc --version
rustc 1.38.0-nightly (a7f28678b 2019-07-23)

$ git --version
git version 2.19.0.windows.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions