Adjust style

This commit is contained in:
Carlos Martín Nieto 2015-07-01 16:00:17 +02:00
parent 84275e691f
commit 4eae20ec27
1 changed files with 4 additions and 6 deletions

View File

@ -260,13 +260,11 @@ func (v *Repository) IsHeadDetached() (bool, error) {
defer runtime.UnlockOSThread() defer runtime.UnlockOSThread()
ret := C.git_repository_head_detached(v.ptr) ret := C.git_repository_head_detached(v.ptr)
switch ret { if ret < 0 {
case 1: return false, MakeGitError(ret)
return true, nil
case 0:
return false, nil
} }
return false, MakeGitError(ret)
return ret != 0, nil
} }
func (v *Repository) CreateReference(name string, id *Oid, force bool, sig *Signature, msg string) (*Reference, error) { func (v *Repository) CreateReference(name string, id *Oid, force bool, sig *Signature, msg string) (*Reference, error) {