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
Now I stumbled on the fact that if I do clone over http, I get plumbing.ErrReferenceNotFound which is an error type and can be used with errors.Is().
But if i clone over ssh, i get git.NoMatchingRefSpecError, which is NOT an error type (it is a struct that implements error). For this one I have to add case git.NoMatchingRefSpecError{}.Is(err): return true to make it work.
The text was updated successfully, but these errors were encountered:
There are too many errors for "Not found".
In my code to just be able to check if something is "not found" I have to do:
Now I stumbled on the fact that if I do clone over http, I get
plumbing.ErrReferenceNotFound
which is an error type and can be used witherrors.Is()
.But if i clone over ssh, i get
git.NoMatchingRefSpecError
, which is NOT an error type (it is a struct that implements error). For this one I have to addcase git.NoMatchingRefSpecError{}.Is(err): return true
to make it work.The text was updated successfully, but these errors were encountered: