diff options
author | guillep2k <github.com@mailfilter.com.ar> | 2019-08-03 14:42:09 -0300 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-08-03 18:42:09 +0100 |
commit | 4fe490f062a4bdf943d9b58398ecbd5b1d2b1b7e (patch) | |
tree | 70b17ba808b8b6064bf3c817eff565fb56e47637 /models/repo_indexer.go | |
parent | 7d9a13035e0dd9f38bbb67f9b300d53c3579fb01 (diff) | |
download | gitea-4fe490f062a4bdf943d9b58398ecbd5b1d2b1b7e.tar.gz gitea-4fe490f062a4bdf943d9b58398ecbd5b1d2b1b7e.zip |
Fixes indexed repos keeping outdated indexes when files grow too large (#7712)
Diffstat (limited to 'models/repo_indexer.go')
-rw-r--r-- | models/repo_indexer.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo_indexer.go b/models/repo_indexer.go index 3a41e0525a..c991b1aac9 100644 --- a/models/repo_indexer.go +++ b/models/repo_indexer.go @@ -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). |