libgit2 / libgit2/libgit2sharp

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

Open
#1,878 3 comments 1 reaction 0 assignees View on GitHub

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.

image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.