You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attached a debugger to see what is going on and it looks like the error happens when PowerShell tries to display the object. It enumerates (or tries to) the repository object and when there aren't any notes, we get the exception.
If I save the repository object to a variable, I don't get the error, e.g. $repo = New-object 'LibGit2Sharp.Repository' 'F:\Build\LibGit2Sharp'
What's the best way to gracefully handle when there aren't any notes?
Windows 7/PowerShell 5/libgit2sharp 0.22
When I try to create a
LibGit2Sharp.Repository
object, I get this exception [1]Steps to reproduce:
add-type -Path .\LibGit2Sharp.dll
New-object 'LibGit2Sharp.Repository' 'F:\Build\LibGit2Sharp'
Note the exception.
[1]
The text was updated successfully, but these errors were encountered: