diff options
author | Michael Leopard <mleopard@gitlab.com> | 2018-12-17 19:30:47 +0300 |
---|---|---|
committer | Michael Leopard <mleopard@gitlab.com> | 2018-12-17 19:30:47 +0300 |
commit | ee9f0abe06c9967cf7b0ce29749f8af3bd618f75 (patch) | |
tree | c26bf3d27bf5739771da396e58260cbd7c7c2879 | |
parent | 9efc6b02e63fe28864a7799339f6c5b413770acb (diff) |
Removing cast on refName and fmt.Sprintf
-rw-r--r-- | internal/service/ref/branches.go | 3 |
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 } |