|
|
@ -100,10 +100,6 @@ func populateRepoIndexer() error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type updateBatch struct {
|
|
|
|
|
|
|
|
updates []indexer.RepoIndexerUpdate
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func updateRepoIndexer(repo *Repository) error {
|
|
|
|
func updateRepoIndexer(repo *Repository) error {
|
|
|
|
changes, err := getRepoChanges(repo)
|
|
|
|
changes, err := getRepoChanges(repo)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -163,6 +159,10 @@ func addUpdate(filename string, repo *Repository, batch *indexer.Batch) error {
|
|
|
|
return err
|
|
|
|
return err
|
|
|
|
} else if stat.Size() > setting.Indexer.MaxIndexerFileSize {
|
|
|
|
} else if stat.Size() > setting.Indexer.MaxIndexerFileSize {
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
|
|
|
|
} else if stat.IsDir() {
|
|
|
|
|
|
|
|
// file could actually be a directory, if it is the root of a submodule.
|
|
|
|
|
|
|
|
// We do not index submodule contents, so don't do anything.
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fileContents, err := ioutil.ReadFile(filepath)
|
|
|
|
fileContents, err := ioutil.ReadFile(filepath)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|