error: don't read an error string on ErrUser

This commit is contained in:
Carlos Martín Nieto 2017-05-20 19:09:30 +02:00 committed by Carlos Martín Nieto
parent c5e6dc298e
commit 50f588fcc4
1 changed files with 1 additions and 1 deletions

2
git.go
View File

@ -279,7 +279,7 @@ func MakeGitError(errorCode C.int) error {
var errMessage string
var errClass ErrorClass
if errorCode != C.GIT_ITEROVER {
if errorCode != C.GIT_ITEROVER && errorCode != C.GIT_EUSER {
err := C.giterr_last()
if err != nil {
errMessage = C.GoString(err.message)