Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure.HandleError does not set GitErrorCategory. #1840

Open
dimarobert opened this issue Oct 23, 2020 · 0 comments
Open

Ensure.HandleError does not set GitErrorCategory. #1840

dimarobert opened this issue Oct 23, 2020 · 0 comments

Comments

@dimarobert
Copy link

@dimarobert dimarobert commented Oct 23, 2020

Reproduction steps

This reproduces with any error handled by Ensure.HandleError, but my exact repro steps are:

  1. Clone repository
  2. Commit
  3. Push with credentials that have only read permissions to the repo.

Looking at the error message, the error appears to be thrown from here.

Expected behavior

Exception is thrown and the ex.Data["libgit2.category"] is set to a proper value. In my case it would be GitErrorCategory.Net.

Actual behavior

Exception is thrown, but the ex.Data["libgit2.category"] has value -1.

Version of LibGit2Sharp (release number or SHA1)

0.26.2

Operating system(s) tested; .NET runtime tested

Windows 10 1909; NET 4.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.