MCPcopy Create free account
hub / github.com/libgit2/git2go / IsErrorCode

Function IsErrorCode

git.go:309–317  ·  view source on GitHub ↗
(err error, c ErrorCode)

Source from the content-addressed store, hash-verified

307}
308
309func IsErrorCode(err error, c ErrorCode) bool {
310 if err == nil {
311 return false
312 }
313 if gitError, ok := err.(*GitError); ok {
314 return gitError.Code == c
315 }
316 return false
317}
318
319func MakeGitError(c C.int) error {
320 var errMessage string

Callers 11

TestNoteIteratorFunction · 0.85
TestStashFunction · 0.85
ForEachMethod · 0.85
TestEmptyOidFunction · 0.85
TestReferenceIteratorFunction · 0.85
TestMempackFunction · 0.85
IterateMethod · 0.85
TestBranchIteratorFunction · 0.85
TestBranchIteratorEachFunction · 0.85
TestObjectPeelFunction · 0.85

Calls

no outgoing calls

Tested by 9

TestNoteIteratorFunction · 0.68
TestStashFunction · 0.68
TestEmptyOidFunction · 0.68
TestReferenceIteratorFunction · 0.68
TestMempackFunction · 0.68
TestBranchIteratorFunction · 0.68
TestBranchIteratorEachFunction · 0.68
TestObjectPeelFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…