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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
100c687c
Commit
100c687c
authored
Apr 25, 2018
by
Sergey Sinev
Committed by
Stan Hu
May 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error when deleting an empty list of refs
Closes #45743
parent
8bacfbd1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
changelogs/unreleased/xeodon-gitlab-ce-fix-45743-master-fix-gitaly-delete-refs.yml
...don-gitlab-ce-fix-45743-master-fix-gitaly-delete-refs.yml
+5
-0
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+1
-1
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+4
-0
No files found.
changelogs/unreleased/xeodon-gitlab-ce-fix-45743-master-fix-gitaly-delete-refs.yml
0 → 100644
View file @
100c687c
---
title
:
Fix error when deleting an empty list of refs
merge_request
:
author
:
type
:
fixed
lib/gitlab/git/repository.rb
View file @
100c687c
...
...
@@ -2346,7 +2346,7 @@ module Gitlab
end
def
gitaly_delete_refs
(
*
ref_names
)
gitaly_ref_client
.
delete_refs
(
refs:
ref_names
)
gitaly_ref_client
.
delete_refs
(
refs:
ref_names
)
if
ref_names
.
any?
end
def
rugged_remove_remote
(
remote_name
)
...
...
spec/lib/gitlab/git/repository_spec.rb
View file @
100c687c
...
...
@@ -600,6 +600,10 @@ describe Gitlab::Git::Repository, seed_helper: true do
end
end
it
'does not fail when deleting an empty list of refs'
do
expect
{
repo
.
delete_refs
(
*
[])
}.
not_to
raise_error
end
it
'raises an error if it failed'
do
expect
{
repo
.
delete_refs
(
'refs\heads\fix'
)
}.
to
raise_error
(
Gitlab
::
Git
::
Repository
::
GitError
)
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