libgit2 / libgit2/libgit2sharp

Most exceptions have the same type of LibGit2SharpException

Open
#1,934 1 comment 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

Most exceptions have the same type of LibGit2SharpException, which makes it difficult to filter specific exceptions and throw our own exception with some custom message. One example is below:

Reproduction steps

When we provide incorrect credentials, it gives an error message "Too many authentication replays" with an exception type of LibGit2SharpException. Because of this, we cannot identify exception based on its type and provide a more user friendly exception.

Version of LibGit2Sharp (release number or SHA1)

0.27.0-preview-0158

Operating system(s) tested; .NET runtime tested

OS: Windows 10
.NET runtime: .NET 6.0

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 the incorrect-credentials case described for LibGit2Sharp 0.27.0-preview-0158 on Windows 10 with .NET 6.0, and inspect the resulting LibGit2SharpException and message. Done should mean callers can distinguish this authentication failure by exception type and provide a custom user-friendly message.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.