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
143a632e
Commit
143a632e
authored
Jun 14, 2018
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tags are migrated to Gitaly
Closes
https://gitlab.com/gitlab-org/gitaly/issues/390
parent
36d75be3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
32 deletions
+2
-32
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+2
-32
No files found.
lib/gitlab/git/repository.rb
View file @
143a632e
...
...
@@ -273,12 +273,8 @@ module Gitlab
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/390
def
tags
gitaly_migrate
(
:tags
,
status:
Gitlab
::
GitalyClient
::
MigrationStatus
::
OPT_OUT
)
do
|
is_enabled
|
if
is_enabled
tags_from_gitaly
else
tags_from_rugged
end
wrapped_gitaly_errors
do
gitaly_ref_client
.
tags
end
end
...
...
@@ -1931,37 +1927,11 @@ module Gitlab
end
end
def
tags_from_rugged
rugged
.
references
.
each
(
"refs/tags/*"
).
map
do
|
ref
|
message
=
nil
if
ref
.
target
.
is_a?
(
Rugged
::
Tag
::
Annotation
)
tag_message
=
ref
.
target
.
message
if
tag_message
.
respond_to?
(
:chomp
)
message
=
tag_message
.
chomp
end
end
target_commit
=
Gitlab
::
Git
::
Commit
.
find
(
self
,
ref
.
target
)
Gitlab
::
Git
::
Tag
.
new
(
self
,
{
name:
ref
.
name
,
target:
ref
.
target
,
target_commit:
target_commit
,
message:
message
})
end
.
sort_by
(
&
:name
)
end
def
last_commit_for_path_by_rugged
(
sha
,
path
)
sha
=
last_commit_id_for_path_by_shelling_out
(
sha
,
path
)
commit
(
sha
)
end
def
tags_from_gitaly
gitaly_ref_client
.
tags
end
def
size_by_shelling_out
popen
(
%w(du -sk)
,
path
).
first
.
strip
.
to_i
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