Fix lightweight tags not processed correctly by GitTagPushService
When we updated gitlab_git to 10.4.1, `tag.target` changed from pointing to the sha of the tag to the sha of the commit the tag points to. The problem is that only annotated tags have `object_sha`s, lightweight tags don't (it's nil), so (only) in their case we still need to use `tag.target`.
显示
- CHANGELOG.md 1 个添加, 0 个删除CHANGELOG.md
- Gemfile 1 个添加, 1 个删除Gemfile
- Gemfile.lock 3 个添加, 3 个删除Gemfile.lock
- app/controllers/projects/tags_controller.rb 1 个添加, 1 个删除app/controllers/projects/tags_controller.rb
- app/models/repository.rb 12 个添加, 12 个删除app/models/repository.rb
- app/services/delete_branch_service.rb 1 个添加, 1 个删除app/services/delete_branch_service.rb
- app/services/delete_tag_service.rb 1 个添加, 1 个删除app/services/delete_tag_service.rb
- app/services/git_tag_push_service.rb 2 个添加, 2 个删除app/services/git_tag_push_service.rb
- app/views/projects/branches/_branch.html.haml 1 个添加, 1 个删除app/views/projects/branches/_branch.html.haml
- app/views/projects/issues/_related_branches.html.haml 1 个添加, 1 个删除app/views/projects/issues/_related_branches.html.haml
- app/views/projects/tags/_tag.html.haml 1 个添加, 1 个删除app/views/projects/tags/_tag.html.haml
- lib/api/entities.rb 2 个添加, 2 个删除lib/api/entities.rb
- lib/gitlab/data_builder/push.rb 1 个添加, 1 个删除lib/gitlab/data_builder/push.rb
- spec/finders/branches_finder_spec.rb 1 个添加, 1 个删除spec/finders/branches_finder_spec.rb
- spec/finders/tags_finder_spec.rb 1 个添加, 1 个删除spec/finders/tags_finder_spec.rb
- spec/models/repository_spec.rb 7 个添加, 7 个删除spec/models/repository_spec.rb
- spec/services/git_tag_push_service_spec.rb 123 个添加, 50 个删除spec/services/git_tag_push_service_spec.rb
- spec/views/projects/issues/_related_branches.html.haml_spec.rb 1 个添加, 1 个删除...views/projects/issues/_related_branches.html.haml_spec.rb
加载中
想要评论请 注册 或 登录