From 5c97ce3c61990ac13b70463503e4bd07ca56e0bf Mon Sep 17 00:00:00 2001 From: Guillermo Prandi Date: Fri, 2 Aug 2019 01:29:51 -0300 Subject: [PATCH] Fixes indexed repos keeping outdated indexes when files grow too large --- models/repo_indexer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/repo_indexer.go b/models/repo_indexer.go index 140ec66c0355c..0fd8b312cd1e1 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).