BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
202ab628
Commit
202ab628
authored
Nov 20, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-conflict-highlighting' into 'master'
Fix conflict highlighting See merge request gitlab-org/gitlab-ce!15463
parents
77350d96
64a9e53b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
repository.rb
app/models/repository.rb
+0
-4
repository.rb
lib/gitlab/git/repository.rb
+4
-0
file_spec.rb
spec/lib/gitlab/conflict/file_spec.rb
+7
-0
No files found.
app/models/repository.rb
View file @
202ab628
...
...
@@ -996,10 +996,6 @@ class Repository
raw_repository
.
ls_files
(
actual_ref
)
end
def
gitattribute
(
path
,
name
)
raw_repository
.
attributes
(
path
)[
name
]
end
def
copy_gitattributes
(
ref
)
actual_ref
=
ref
||
root_ref
begin
...
...
lib/gitlab/git/repository.rb
View file @
202ab628
...
...
@@ -984,6 +984,10 @@ module Gitlab
@attributes
.
attributes
(
path
)
end
def
gitattribute
(
path
,
name
)
attributes
(
path
)[
name
]
end
def
languages
(
ref
=
nil
)
Gitlab
::
GitalyClient
.
migrate
(
:commit_languages
)
do
|
is_enabled
|
if
is_enabled
...
...
spec/lib/gitlab/conflict/file_spec.rb
View file @
202ab628
...
...
@@ -84,6 +84,13 @@ describe Gitlab::Conflict::File do
expect
(
line
.
text
).
to
eq
(
html_to_text
(
line
.
rich_text
))
end
end
# This spec will break if Rouge's highlighting changes, but we need to
# ensure that the lines are actually highlighted.
it
'highlights the lines correctly'
do
expect
(
conflict_file
.
lines
.
first
.
rich_text
)
.
to
eq
(
"<span id=
\"
LC1
\"
class=
\"
line
\"
lang=
\"
ruby
\"
><span class=
\"
k
\"
>module</span> <span class=
\"
nn
\"
>Gitlab</span></span>
\n
"
)
end
end
describe
'#sections'
do
...
...
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