Commit 24424d93 authored by Sean McGivern's avatar Sean McGivern

Fix merge conflict size limit

parent f7b64a46
...@@ -97,6 +97,7 @@ v 8.12.0 (unreleased) ...@@ -97,6 +97,7 @@ v 8.12.0 (unreleased)
v 8.11.5 (unreleased) v 8.11.5 (unreleased)
- Optimize branch lookups and force a repository reload for Repository#find_branch - Optimize branch lookups and force a repository reload for Repository#find_branch
- Fix member expiration date picker after update - Fix member expiration date picker after update
- Make merge conflict file size limit 200 KB, to match the docs
- Fix suggested colors options for new labels in the admin area. !6138 - Fix suggested colors options for new labels in the admin area. !6138
- Fix GitLab import button - Fix GitLab import button
- Remove gitorious from import_sources - Remove gitorious from import_sources
......
...@@ -18,7 +18,7 @@ module Gitlab ...@@ -18,7 +18,7 @@ module Gitlab
def parse(text, our_path:, their_path:, parent_file: nil) def parse(text, our_path:, their_path:, parent_file: nil)
raise UnmergeableFile if text.blank? # Typically a binary file raise UnmergeableFile if text.blank? # Typically a binary file
raise UnmergeableFile if text.length > 102400 raise UnmergeableFile if text.length > 200.kilobytes
begin begin
text.to_json text.to_json
......
...@@ -179,8 +179,8 @@ CONFLICT ...@@ -179,8 +179,8 @@ CONFLICT
to raise_error(Gitlab::Conflict::Parser::UnmergeableFile) to raise_error(Gitlab::Conflict::Parser::UnmergeableFile)
end end
it 'raises UnmergeableFile when the file is over 100 KB' do it 'raises UnmergeableFile when the file is over 200 KB' do
expect { parse_text('a' * 102401) }. expect { parse_text('a' * 204801) }.
to raise_error(Gitlab::Conflict::Parser::UnmergeableFile) to raise_error(Gitlab::Conflict::Parser::UnmergeableFile)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment