diff --git a/gitindex/index.go b/gitindex/index.go index 084e59193..5bb499c63 100644 --- a/gitindex/index.go +++ b/gitindex/index.go @@ -469,8 +469,13 @@ func indexGitRepo(opts Options, config gitIndexConfig) (bool, error) { } } - if opts.Incremental && opts.BuildOptions.IncrementalSkipIndexing() { - return false, nil + if opts.Incremental { + state, _ := opts.BuildOptions.IndexState() + if state == build.IndexStateEqual { + log.Printf("incremental: skipping repository=%q reason=%s", opts.BuildOptions.RepositoryDescription.Name, state) + return false, nil + } + log.Printf("incremental: indexing repository=%q reason=%s", opts.BuildOptions.RepositoryDescription.Name, state) } // branch => (path, sha1) => repo.