1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 17:53:10 +00:00

Fixes indexed repos keeping outdated indexes when files grow too large (#7712)

This commit is contained in:
guillep2k 2019-08-03 14:42:09 -03:00 committed by zeripath
parent 7d9a13035e
commit 4fe490f062

View file

@ -199,7 +199,7 @@ func addUpdate(update fileUpdate, repo *Repository, batch rupture.FlushingBatch)
if size, err := strconv.Atoi(strings.TrimSpace(stdout)); err != nil {
return fmt.Errorf("Misformatted git cat-file output: %v", err)
} else if int64(size) > setting.Indexer.MaxIndexerFileSize {
return nil
return addDelete(update.Filename, repo, batch)
}
fileContents, err := git.NewCommand("cat-file", "blob", update.BlobSha).