aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo_indexer.go
diff options
context:
space:
mode:
authorguillep2k <github.com@mailfilter.com.ar>2019-08-03 14:42:09 -0300
committerzeripath <art27@cantab.net>2019-08-03 18:42:09 +0100
commit4fe490f062a4bdf943d9b58398ecbd5b1d2b1b7e (patch)
tree70b17ba808b8b6064bf3c817eff565fb56e47637 /models/repo_indexer.go
parent7d9a13035e0dd9f38bbb67f9b300d53c3579fb01 (diff)
downloadgitea-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.go2
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).