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
f8478a27
Commit
f8478a27
authored
Jul 20, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix EE-only uses of Gitlab::Git::Tag broken in
b304fd79
parent
0221d6c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
app/models/concerns/repository_mirroring.rb
app/models/concerns/repository_mirroring.rb
+2
-1
spec/services/projects/update_remote_mirror_service_spec.rb
spec/services/projects/update_remote_mirror_service_spec.rb
+4
-2
No files found.
app/models/concerns/repository_mirroring.rb
View file @
f8478a27
...
...
@@ -29,7 +29,8 @@ module RepositoryMirroring
def
remote_tags
(
remote
)
gitlab_shell
.
list_remote_tags
(
storage_path
,
path_with_namespace
,
remote
).
map
do
|
name
,
target
|
Gitlab
::
Git
::
Tag
.
new
(
raw_repository
,
name
,
target
)
target_commit
=
Gitlab
::
Git
::
Commit
.
find
(
raw_repository
,
target
)
Gitlab
::
Git
::
Tag
.
new
(
raw_repository
,
name
,
target
,
target_commit
)
end
end
...
...
spec/services/projects/update_remote_mirror_service_spec.rb
View file @
f8478a27
...
...
@@ -205,8 +205,10 @@ describe Projects::UpdateRemoteMirrorService do
def
generate_tags
(
repository
,
*
tag_names
)
tag_names
.
each_with_object
([])
do
|
name
,
tags
|
target_commit
=
repository
.
find_tag
(
name
).
try
(
:dereferenced_target
).
try
(
:raw_commit
)
tags
<<
Gitlab
::
Git
::
Tag
.
new
(
repository
.
raw_repository
,
name
,
target_commit
)
tag
=
repository
.
find_tag
(
name
)
target
=
tag
.
try
(
:target
)
target_commit
=
tag
.
try
(
:dereferenced_target
)
tags
<<
Gitlab
::
Git
::
Tag
.
new
(
repository
.
raw_repository
,
name
,
target
,
target_commit
)
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