libgit2sharp icon indicating copy to clipboard operation
libgit2sharp copied to clipboard

Repository.Init() creates unexpected symlink with `_git2_` prefix in working dir

Open bert2 opened this issue 3 years ago • 3 comments

Reproduction steps

Call Repository.Init(path) where path is an existing empty directory.

Expected behavior

path will contain a directory named .git and nothing else.

Actual behavior

There is also a symlink created which always has the prefix _git2_ and may look like this: _git2_a05400.

image

Version of LibGit2Sharp (release number or SHA1)

0.26.2

Operating system(s) tested; .NET runtime tested

win 10; net 5.0.202

bert2 avatar Apr 14 '21 21:04 bert2

It kinda looks like there is test code leaking into production here, but that's just a very wild guess.

I briefly checked the source, but couldn't find anything obvious that creates this symlink. So maybe it's happening in git_repository_init_ext?

#1726 might be related, but I wasn't able to make any sense of it.

bert2 avatar Apr 14 '21 21:04 bert2

I'm also seeing this issue, This happening for some users that they can reproduce but with the same build I can't.

This is so wierd. Is this system related something?

anwar3606 avatar Mar 02 '22 14:03 anwar3606

We are facing the same issue, but also no pattern yet.

cheesi avatar Sep 02 '22 12:09 cheesi