return nil instead of empty array on error

This commit is contained in:
Jesse Ezell 2014-03-20 20:24:29 -07:00
parent 99d7f66477
commit 5d8db7f936
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ func (repo *Repository) ListRemotes() ([]string, error) {
var r C.git_strarray
ecode := C.git_remote_list(&r, repo.ptr)
if ecode < 0 {
return make([]string, 0), MakeGitError(ecode)
return nil, MakeGitError(ecode)
}
defer C.git_strarray_free(&r)