return nil instead of empty array on error
This commit is contained in:
parent
99d7f66477
commit
5d8db7f936
|
@ -136,7 +136,7 @@ func (repo *Repository) ListRemotes() ([]string, error) {
|
||||||
var r C.git_strarray
|
var r C.git_strarray
|
||||||
ecode := C.git_remote_list(&r, repo.ptr)
|
ecode := C.git_remote_list(&r, repo.ptr)
|
||||||
if ecode < 0 {
|
if ecode < 0 {
|
||||||
return make([]string, 0), MakeGitError(ecode)
|
return nil, MakeGitError(ecode)
|
||||||
}
|
}
|
||||||
defer C.git_strarray_free(&r)
|
defer C.git_strarray_free(&r)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue