libgit2 / libgit2/libgit2sharp

Repository.IsValid uses exception for flow control

Open
#1,816 0 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

Repository.IsValid uses catching of an Exception to test for validity. This could be considered using exceptions for flow control. It gets annoying for me since I'm checking this often in my application and often the repo isn't there yet so it has a (handled) exception while debugging.
A pull request has been opened to resolve this.

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 Repository.IsValid and review the pull request mentioned in the issue to understand the proposed change. Confirm the implementation avoids exception-based validity checks and verify the behavior when the repository does not yet exist.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.