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
15f0cef1
Commit
15f0cef1
authored
Jun 14, 2018
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Local branches go through Gitaly
Closes
https://gitlab.com/gitlab-org/gitaly/issues/217
parent
3ed4a1b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
20 deletions
+2
-20
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+2
-20
No files found.
lib/gitlab/git/repository.rb
View file @
15f0cef1
...
@@ -190,12 +190,8 @@ module Gitlab
...
@@ -190,12 +190,8 @@ module Gitlab
end
end
def
local_branches
(
sort_by:
nil
)
def
local_branches
(
sort_by:
nil
)
gitaly_migrate
(
:local_branches
,
status:
Gitlab
::
GitalyClient
::
MigrationStatus
::
OPT_OUT
)
do
|
is_enabled
|
wrapped_gitaly_errors
do
if
is_enabled
gitaly_ref_client
.
local_branches
(
sort_by:
sort_by
)
gitaly_ref_client
.
local_branches
(
sort_by:
sort_by
)
else
branches_filter
(
filter: :local
,
sort_by:
sort_by
)
end
end
end
end
end
...
@@ -1682,20 +1678,6 @@ module Gitlab
...
@@ -1682,20 +1678,6 @@ module Gitlab
}
}
end
end
# Gitaly note: JV: Trying to get rid of the 'filter' option so we can implement this with 'git'.
def
branches_filter
(
filter:
nil
,
sort_by:
nil
)
branches
=
rugged
.
branches
.
each
(
filter
).
map
do
|
rugged_ref
|
begin
target_commit
=
Gitlab
::
Git
::
Commit
.
find
(
self
,
rugged_ref
.
target
)
Gitlab
::
Git
::
Branch
.
new
(
self
,
rugged_ref
.
name
,
rugged_ref
.
target
,
target_commit
)
rescue
Rugged
::
ReferenceError
# Omit invalid branch
end
end
.
compact
sort_branches
(
branches
,
sort_by
)
end
def
git_merged_branch_names
(
branch_names
,
root_sha
)
def
git_merged_branch_names
(
branch_names
,
root_sha
)
git_arguments
=
git_arguments
=
%W[branch --merged
#{
root_sha
}
%W[branch --merged
#{
root_sha
}
...
...
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