Skip to content

Commit 1b58c30

Browse files
committed
gitbase: fix bugs handling git errors
Signed-off-by: Javi Fontan <[email protected]>
1 parent 09bc815 commit 1b58c30

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

files.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ func (i *filesIter) Next() (sql.Row, error) {
249249
i.files = nil
250250
continue
251251
}
252+
253+
return nil, err
252254
}
253255

254256
if !i.shouldVisitFile(f) {

repository_pool.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,10 @@ func (i *rowRepoIter) Next() (sql.Row, error) {
369369

370370
i.currRepoIter, err = i.iter.NewIterator(repo)
371371
if err != nil {
372+
if i.session.SkipGitErrors {
373+
continue
374+
}
375+
372376
return nil, err
373377
}
374378
}

0 commit comments

Comments
 (0)