Skip to content

Commit

Permalink
Fixes indexed repos keeping outdated indexes when files grow too large (
Browse files Browse the repository at this point in the history
#7731)

* Fixes indexed repos keeping outdated indexes when files grow too large

Co-Authored-By: zeripath <[email protected]>
  • Loading branch information
2 people authored and lafriks committed Aug 3, 2019
1 parent 6d441de commit 0d10482
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/repo_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 0d10482

Please sign in to comment.