libgit2 / libgit2/libgit2sharp

Infinite Loop when you enters a invalid path (Repository Init)

Open
#1,664 8 comments 0 reactions 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

Tried some stuff and explored this bug.

When you are trying to create a new repository with Repository.Init(string path) and the path is invalid, you will get a infinite loop.
Tried with this path "Z:\Users\justi\Pictures" and Z: doesnt exist on my computer.

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 by reproducing Repository.Init(string path) with the invalid Z:\Users\justi\Pictures path described in the issue, then trace the initialization loop and path validation. Done means invalid paths terminate with an appropriate failure instead of looping indefinitely, while valid repository initialization continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.