From a7d3c5955ac9426dd57bf4d3df87ca1eba049789 Mon Sep 17 00:00:00 2001 From: Jesse Ezell Date: Fri, 4 Apr 2014 00:56:58 -0700 Subject: merge with improved error handling logic --- branch.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'branch.go') diff --git a/branch.go b/branch.go index a0c1dbd..af21140 100644 --- a/branch.go +++ b/branch.go @@ -53,9 +53,7 @@ func (i *BranchIterator) Next() (*Branch, BranchType, error) { ecode := C.git_branch_next(&refPtr, &refType, i.ptr) - if ecode == C.GIT_ITEROVER { - return nil, BranchLocal, ErrIterOver - } else if ecode < 0 { + if ecode < 0 { return nil, BranchLocal, MakeGitError(ecode) } -- cgit v1.2.3