Remote Rename Fix

Problem string array is returned if no error is occurred
This commit is contained in:
Mirko Nosenzo 2016-10-08 11:15:47 +02:00
parent c6b94a160e
commit 717a47f754
No known key found for this signature in database
GPG Key ID: E6EBC1DB672BD11E
1 changed files with 4 additions and 3 deletions

View File

@ -467,10 +467,11 @@ func (c *RemoteCollection) Rename(remote, newname string) ([]string, error) {
ret := C.git_remote_rename(&cproblems, c.repo.ptr, cremote, cnewname)
if ret < 0 {
problems := makeStringsFromCStrings(cproblems.strings, int(cproblems.count))
return problems, MakeGitError(ret)
return []string{}, MakeGitError(ret)
}
return []string{}, nil
problems := makeStringsFromCStrings(cproblems.strings, int(cproblems.count))
return problems, nil
}
func (c *RemoteCollection) SetUrl(remote, url string) error {