Skip to content

Commit 4a11080

Browse files
chore: Add logs to incremental indexing path (#8)
1 parent 07c64af commit 4a11080

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

gitindex/index.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,13 @@ func indexGitRepo(opts Options, config gitIndexConfig) (bool, error) {
469469
}
470470
}
471471

472-
if opts.Incremental && opts.BuildOptions.IncrementalSkipIndexing() {
473-
return false, nil
472+
if opts.Incremental {
473+
state, _ := opts.BuildOptions.IndexState()
474+
if state == build.IndexStateEqual {
475+
log.Printf("incremental: skipping repository=%q reason=%s", opts.BuildOptions.RepositoryDescription.Name, state)
476+
return false, nil
477+
}
478+
log.Printf("incremental: indexing repository=%q reason=%s", opts.BuildOptions.RepositoryDescription.Name, state)
474479
}
475480

476481
// branch => (path, sha1) => repo.

0 commit comments

Comments
 (0)