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
558ddfbb
Commit
558ddfbb
authored
Jan 19, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES: fix for imported project
parent
9223e824
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
app/models/project.rb
app/models/project.rb
+5
-0
app/models/repository.rb
app/models/repository.rb
+1
-1
No files found.
app/models/project.rb
View file @
558ddfbb
...
...
@@ -260,6 +260,11 @@ class Project < ActiveRecord::Base
project
.
mirror_last_successful_update_at
=
timestamp
project
.
save
end
if
Gitlab
.
config
.
elasticsearch
.
enabled
project
.
repository
.
index_blobs
project
.
repository
.
index_commits
end
end
after_transition
started: :failed
do
|
project
,
transaction
|
...
...
app/models/repository.rb
View file @
558ddfbb
...
...
@@ -680,7 +680,7 @@ class Repository
content
=
result
[
"_source"
][
"blob"
][
"content"
]
total_lines
=
content
.
lines
.
size
term
=
result
[
"highlight"
][
"blob.content"
][
0
].
match
(
/gitlabelasticsearch→(.*)←gitlabelasticsearch/
)[
1
]
term
=
result
[
"highlight"
][
"blob.content"
][
0
].
match
(
/gitlabelasticsearch→(.*
?
)←gitlabelasticsearch/
)[
1
]
found_line_number
=
0
content
.
each_line
.
each_with_index
do
|
line
,
index
|
...
...
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