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:
Diffstat (limited to 'internal/service/ref/refs.go')
-rw-r--r--internal/service/ref/refs.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/service/ref/refs.go b/internal/service/ref/refs.go
index 051e9fb5a..6fe12e34e 100644
--- a/internal/service/ref/refs.go
+++ b/internal/service/ref/refs.go
@@ -5,9 +5,11 @@ import (
"bytes"
"fmt"
"io"
- "log"
"strings"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+
pb "gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitaly/internal/helper"
"golang.org/x/net/context"
@@ -39,7 +41,7 @@ func findRefs(writer refsWriter, repo *pb.Repository, pattern string, args ...st
return err
}
- log.Printf("FindRefs: RepoPath=%q Pattern=%q", repoPath, pattern)
+ helper.Debugf("FindRefs: RepoPath=%q Pattern=%q", repoPath, pattern)
baseArgs := []string{"--git-dir", repoPath, "for-each-ref", pattern}
@@ -165,11 +167,11 @@ func (s *server) FindDefaultBranchName(ctx context.Context, in *pb.FindDefaultBr
return nil, err
}
- log.Printf("FindDefaultBranchName: RepoPath=%q", repoPath)
+ helper.Debugf("FindDefaultBranchName: RepoPath=%q", repoPath)
defaultBranchName, err := defaultBranchName(repoPath)
if err != nil {
- return nil, err
+ return nil, grpc.Errorf(codes.Internal, err.Error())
}
return &pb.FindDefaultBranchNameResponse{Name: defaultBranchName}, nil