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
d4787bf5
Commit
d4787bf5
authored
Jul 15, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix undefined constant Gitlab::Git::HooksService::PreReceiveError
Part of gitlab-org/gitlab-ce#49263
parent
d7eb6972
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
ee/app/services/projects/update_mirror_service.rb
ee/app/services/projects/update_mirror_service.rb
+1
-1
ee/spec/services/projects/update_mirror_service_spec.rb
ee/spec/services/projects/update_mirror_service_spec.rb
+8
-0
No files found.
ee/app/services/projects/update_mirror_service.rb
View file @
d4787bf5
...
...
@@ -49,7 +49,7 @@ module Projects
else
begin
repository
.
ff_merge
(
current_user
,
upstream_branch
.
dereferenced_target
,
name
)
rescue
Gitlab
::
Git
::
HooksService
::
PreReceiveError
,
Gitlab
::
Git
::
CommitError
=>
e
rescue
Gitlab
::
Git
::
PreReceiveError
,
Gitlab
::
Git
::
CommitError
=>
e
errors
<<
e
.
message
end
end
...
...
ee/spec/services/projects/update_mirror_service_spec.rb
View file @
d4787bf5
...
...
@@ -25,6 +25,14 @@ describe Projects::UpdateMirrorService do
described_class
.
new
(
project
,
project
.
owner
).
execute
end
it
'rescues exceptions from Repository#ff_merge'
do
stub_fetch_mirror
(
project
)
expect
(
project
.
repository
).
to
receive
(
:ff_merge
).
and_raise
(
Gitlab
::
Git
::
PreReceiveError
)
expect
{
described_class
.
new
(
project
,
project
.
owner
).
execute
}.
not_to
raise_error
end
it
"succeeds"
do
stub_fetch_mirror
(
project
)
...
...
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