Commit 975205f7 authored by Rémy Coutable's avatar Rémy Coutable Committed by Ruben Davila

Merge branch 'fix-allowed-conflict-size' into 'master'

Fix merge conflict size limit

## What does this MR do?

The merge conflict size limit was set to 100 KB, but the docs (and the test repo, which the feature specs use) say 200 KB!

## Are there points in the code the reviewer needs to double check?

Don't think so.

## Why was this MR needed?

Derp.

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !6052
parent 70ddbfc3
......@@ -138,6 +138,11 @@ v 8.11.6 (unreleased)
v 8.11.5
- Optimize branch lookups and force a repository reload for Repository#find_branch. !6087
- Fix member expiration date picker after update. !6184
v 8.11.5 (unreleased)
- Optimize branch lookups and force a repository reload for Repository#find_branch
- 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
- Optimize discussion notes resolving and unresolving
- Fix GitLab import button
......
......@@ -18,7 +18,7 @@ class UnsupportedEncoding < ParserError
def parse(text, our_path:, their_path:, parent_file: nil)
raise UnmergeableFile if text.blank? # Typically a binary file
raise UnmergeableFile if text.length > 102400
raise UnmergeableFile if text.length > 200.kilobytes
begin
text.to_json
......
......@@ -179,8 +179,8 @@ def default_regex
to raise_error(Gitlab::Conflict::Parser::UnmergeableFile)
end
it 'raises UnmergeableFile when the file is over 100 KB' do
expect { parse_text('a' * 102401) }.
it 'raises UnmergeableFile when the file is over 200 KB' do
expect { parse_text('a' * 204801) }.
to raise_error(Gitlab::Conflict::Parser::UnmergeableFile)
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