Skip to content

Commit c86dad0

Browse files
committed
Fix incorrect error handling in commitsIter.New
Signed-off-by: Javi Fontan <[email protected]>
1 parent 7c0f2cf commit c86dad0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

iterator.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,9 +783,11 @@ func (i *commitsIter) New(ctx *sql.Context, repo *Repository) (ChainableIter, er
783783
"error": err,
784784
}).Error("unable to get commit iterator")
785785

786-
if session.SkipGitErrors {
786+
if !session.SkipGitErrors {
787787
return nil, err
788788
}
789+
790+
commits = nil
789791
}
790792

791793
return &commitsIter{

0 commit comments

Comments
 (0)