libgit2 / libgit2/libgit2sharp
Repository.Init() creates unexpected symlink with `_git2_` prefix in working dir
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
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.

Version of LibGit2Sharp (release number or SHA1)
0.26.2
Operating system(s) tested; .NET runtime tested
win 10; net 5.0.202
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Repository.Init(path) entry point and reproduce the issue using an existing empty directory on Windows with .NET 5. Trace where the git2 symlink is created, then verify the fix by confirming initialization leaves only the .git directory in the working directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100