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:
authorMichael Leopard <mleopard@gitlab.com>2018-12-17 19:30:47 +0300
committerMichael Leopard <mleopard@gitlab.com>2018-12-17 19:30:47 +0300
commitee9f0abe06c9967cf7b0ce29749f8af3bd618f75 (patch)
treec26bf3d27bf5739771da396e58260cbd7c7c2879
parent9efc6b02e63fe28864a7799339f6c5b413770acb (diff)
Removing cast on refName and fmt.Sprintf
-rw-r--r--internal/service/ref/branches.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/service/ref/branches.go b/internal/service/ref/branches.go
index 83a55652d..09aa25189 100644
--- a/internal/service/ref/branches.go
+++ b/internal/service/ref/branches.go
@@ -2,7 +2,6 @@ package ref
import (
"bufio"
- "fmt"
"io"
"strings"
@@ -56,7 +55,7 @@ func (s *server) FindBranch(ctx context.Context, req *gitalypb.FindBranchRequest
refName = strings.TrimPrefix(refName, "heads/")
}
- cmd, err := git.Command(ctx, repo, "for-each-ref", "--format", "%(objectname)", fmt.Sprintf("refs/heads/%s", string(refName)))
+ cmd, err := git.Command(ctx, repo, "for-each-ref", "--format", "%(objectname)", "refs/heads/"+refName)
if err != nil {
return nil, err
}