Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
24424d93
Commit
24424d93
authored
Aug 26, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge conflict size limit
parent
f7b64a46
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
CHANGELOG
CHANGELOG
+1
-0
lib/gitlab/conflict/parser.rb
lib/gitlab/conflict/parser.rb
+1
-1
spec/lib/gitlab/conflict/parser_spec.rb
spec/lib/gitlab/conflict/parser_spec.rb
+2
-2
No files found.
CHANGELOG
View file @
24424d93
...
...
@@ -97,6 +97,7 @@ v 8.12.0 (unreleased)
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
- Fix GitLab import button
- Remove gitorious from import_sources
...
...
lib/gitlab/conflict/parser.rb
View file @
24424d93
...
...
@@ -18,7 +18,7 @@ module Gitlab
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
...
...
spec/lib/gitlab/conflict/parser_spec.rb
View file @
24424d93
...
...
@@ -179,8 +179,8 @@ CONFLICT
to
raise_error
(
Gitlab
::
Conflict
::
Parser
::
UnmergeableFile
)
end
it
'raises UnmergeableFile when the file is over
1
00 KB'
do
expect
{
parse_text
(
'a'
*
1024
01
)
}.
it
'raises UnmergeableFile when the file is over
2
00 KB'
do
expect
{
parse_text
(
'a'
*
2048
01
)
}.
to
raise_error
(
Gitlab
::
Conflict
::
Parser
::
UnmergeableFile
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment