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
c00264ec
Commit
c00264ec
authored
Aug 01, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix of Commit search breaks for some URLs on gitlab-ce project
parent
56b36c91
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
CHANGELOG-EE
CHANGELOG-EE
+1
-0
app/services/git_push_service.rb
app/services/git_push_service.rb
+4
-4
spec/services/git_push_service_spec.rb
spec/services/git_push_service_spec.rb
+8
-2
No files found.
CHANGELOG-EE
View file @
c00264ec
...
...
@@ -3,6 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.11.0 (unreleased)
- Performance improvement of push rules
- Change LdapGroupSyncWorker to use new LDAP group sync classes
- [Elastic][Fix] Commit search breaks for some URLs on gitlab-ce project
v 8.10.3 (unreleased)
- Fix regression in Git Annex permission check
...
...
app/services/git_push_service.rb
View file @
c00264ec
...
...
@@ -49,6 +49,10 @@ class GitPushService < BaseService
update_gitattributes
if
is_default_branch?
end
if
current_application_settings
.
elasticsearch_indexing?
&&
is_default_branch?
ElasticCommitIndexerWorker
.
perform_async
(
@project
.
id
,
params
[
:oldrev
],
params
[
:newrev
])
end
# Update merge requests that may be affected by this push. A new branch
# could cause the last commit of a merge request to change.
update_merge_requests
...
...
@@ -73,10 +77,6 @@ class GitPushService < BaseService
CreateCommitBuildsService
.
new
.
execute
(
@project
,
current_user
,
build_push_data
,
mirror_update:
mirror_update
)
ProjectCacheWorker
.
perform_async
(
@project
.
id
)
if
current_application_settings
.
elasticsearch_indexing?
ElasticCommitIndexerWorker
.
perform_async
(
@project
.
id
,
params
[
:oldrev
],
params
[
:newrev
])
end
end
def
perform_housekeeping
...
...
spec/services/git_push_service_spec.rb
View file @
c00264ec
...
...
@@ -179,10 +179,16 @@ describe GitPushService, services: true do
stub_application_setting
(
elasticsearch_search:
false
,
elasticsearch_indexing:
false
)
end
it
"triggers indexer"
do
it
"does not trigger indexer when push to non-default branch"
do
expect_any_instance_of
(
Gitlab
::
Elastic
::
Indexer
).
not_to
receive
(
:run
)
execute_service
(
project
,
user
,
@oldrev
,
@newrev
,
'refs/heads/other'
)
end
it
"triggers indexer when push to default branch"
do
expect_any_instance_of
(
Gitlab
::
Elastic
::
Indexer
).
to
receive
(
:run
)
execute_service
(
project
,
user
,
@oldrev
,
@newrev
,
@ref
)
execute_service
(
project
,
user
,
@oldrev
,
@newrev
,
'refs/heads/master'
)
end
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