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
73be2f86
Commit
73be2f86
authored
Mar 02, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
0a12fb6a
190a6a1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
25 deletions
+8
-25
GITALY_SERVER_VERSION
GITALY_SERVER_VERSION
+1
-1
lib/gitlab/gitaly_client/repository_service.rb
lib/gitlab/gitaly_client/repository_service.rb
+7
-14
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+0
-10
No files found.
GITALY_SERVER_VERSION
View file @
73be2f86
1.2
1
.0
1.2
3
.0
\ No newline at end of file
lib/gitlab/gitaly_client/repository_service.rb
View file @
73be2f86
...
...
@@ -324,8 +324,8 @@ module Gitlab
GitalyClient
.
call
(
@storage
,
:repository_service
,
:search_files_by_name
,
request
,
timeout:
GitalyClient
.
fast_timeout
).
flat_map
(
&
:files
)
end
def
search_files_by_content
(
ref
,
query
,
chunked_response:
true
)
request
=
Gitaly
::
SearchFilesByContentRequest
.
new
(
repository:
@gitaly_repo
,
ref:
ref
,
query:
query
,
chunked_response:
chunked_response
)
def
search_files_by_content
(
ref
,
query
)
request
=
Gitaly
::
SearchFilesByContentRequest
.
new
(
repository:
@gitaly_repo
,
ref:
ref
,
query:
query
)
response
=
GitalyClient
.
call
(
@storage
,
:repository_service
,
:search_files_by_content
,
request
)
search_results_from_response
(
response
)
...
...
@@ -340,18 +340,11 @@ module Gitlab
gitaly_response
.
each
do
|
message
|
next
if
message
.
nil?
# Old client will ignore :chunked_response flag
# and return messages with `matches` key.
# This code path will be removed post 12.0 release
if
message
.
matches
.
any?
matches
+=
message
.
matches
else
current_match
<<
message
.
match_data
if
message
.
end_of_match
matches
<<
current_match
current_match
=
+
""
end
current_match
<<
message
.
match_data
if
message
.
end_of_match
matches
<<
current_match
current_match
=
+
""
end
end
...
...
spec/lib/gitlab/git/repository_spec.rb
View file @
73be2f86
...
...
@@ -619,16 +619,6 @@ describe Gitlab::Git::Repository, :seed_helper do
repository
.
search_files_by_content
(
'search-files-by-content'
,
'search-files-by-content-branch'
)
end
end
it_should_behave_like
'search files by content'
do
let
(
:search_results
)
do
repository
.
gitaly_repository_client
.
search_files_by_content
(
'search-files-by-content-branch'
,
'search-files-by-content'
,
chunked_response:
false
)
end
end
end
describe
'#find_remote_root_ref'
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