Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-10-30 20:06:24 +0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2018-10-30 20:06:24 +0300
commitc8b0fefe1868d516527ed92784b0d106d40da81a (patch)
tree76cc86962c4dff4f0423b2af14cffbfb7df7476b
parentee5e1dba38ec88a836a77f6e2ad2f14e33ef07f2 (diff)
Fix encoding bug in User{Create,Delete}Tag
-rw-r--r--changelogs/unreleased/fix-user-delete-tag-encoding.yml5
-rw-r--r--internal/service/operations/tags_test.go4
-rw-r--r--ruby/lib/gitlab/git/repository.rb3
3 files changed, 9 insertions, 3 deletions
diff --git a/changelogs/unreleased/fix-user-delete-tag-encoding.yml b/changelogs/unreleased/fix-user-delete-tag-encoding.yml
new file mode 100644
index 000000000..a83fb6a8a
--- /dev/null
+++ b/changelogs/unreleased/fix-user-delete-tag-encoding.yml
@@ -0,0 +1,5 @@
+---
+title: Fix encoding bug in User{Create,Delete}Tag
+merge_request: 952
+author:
+type: fixed
diff --git a/internal/service/operations/tags_test.go b/internal/service/operations/tags_test.go
index 268d3571d..b458fb000 100644
--- a/internal/service/operations/tags_test.go
+++ b/internal/service/operations/tags_test.go
@@ -61,7 +61,7 @@ func TestSuccessfulGitHooksForUserDeleteTagRequest(t *testing.T) {
testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t)
defer cleanupFn()
- tagNameInput := "to-be-deleted-soon-tag"
+ tagNameInput := "to-be-déleted-soon-tag"
defer exec.Command("git", "-C", testRepoPath, "tag", "-d", tagNameInput).Run()
user := &gitalypb.User{
@@ -119,7 +119,7 @@ func TestSuccessfulUserCreateTagRequest(t *testing.T) {
Email: []byte("ahmad@gitlab.com"),
GlId: "user-123",
}
- inputTagName := "to-be-created-soon"
+ inputTagName := "to-be-créated-soon"
testCases := []struct {
desc string
diff --git a/ruby/lib/gitlab/git/repository.rb b/ruby/lib/gitlab/git/repository.rb
index 22723943e..92f0ddb2a 100644
--- a/ruby/lib/gitlab/git/repository.rb
+++ b/ruby/lib/gitlab/git/repository.rb
@@ -355,7 +355,8 @@ module Gitlab
end
def find_tag(name)
- tags.find { |tag| tag.name == name }
+ name_b = name.b
+ tags.find { |tag| tag.name.b == name_b }
end
def merge(user, source_sha, target_branch, message)