diff options
author | Duncan Ogilvie <mr.exodia.tpodt@gmail.com> | 2017-11-29 02:50:39 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-11-29 09:50:39 +0800 |
commit | 551f3cbe420dcb72bcb784205451d5b01b811041 (patch) | |
tree | 612c505d8f46972a598e1ca118cba45c775f329d /modules | |
parent | 4035ab05fa2d2c8ec95d346fea91cab8211dab17 (diff) | |
download | gitea-551f3cbe420dcb72bcb784205451d5b01b811041.tar.gz gitea-551f3cbe420dcb72bcb784205451d5b01b811041.zip |
Memory usage improvements (#3013)
* govendor update code.gitea.io/git
Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
* Greatly improve memory usage
Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/context/repo.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 38baa42306..e8d084c342 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -143,6 +143,9 @@ func (r *Repository) GetEditorconfig() (*editorconfig.Editorconfig, error) { if err != nil { return nil, err } + if treeEntry.Blob().Size() >= setting.UI.MaxDisplayFileSize { + return nil, git.ErrNotExist{ID: "", RelPath: ".editorconfig"} + } reader, err := treeEntry.Blob().Data() if err != nil { return nil, err |