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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-01-11 12:18:35 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-01-12 14:28:27 +0300
commit53c1d9f4bce9a8eebe9219bc5068e4bc4141de09 (patch)
treed21a1acb6ffb55f7176206cde5f446be54ce8660 /internal/gitaly/service/operations/merge.go
parent01ba5b2c1c0719d27aced511bd9497b56cd9384a (diff)
operations: Move `hookErrorFromStdoutAndStderr()` to where it's used
The `hookErrorFromStdoutAndStderr()` function is used to generate a proper error message when execution of hooks fails. It's thus only used for `updateReferenceWithHooks()`. But since this function has been moved into its own "update_with_hooks.go" file in ff5805ed0 (operations: Move update with hook logic into own file, 2020-11-26) , both functions are located quite far apart from each other. Move `hookErrorFromStdoutAndStderr()` into "update_with_hooks.go" to make code more localized and easier to understand.
Diffstat (limited to 'internal/gitaly/service/operations/merge.go')
-rw-r--r--internal/gitaly/service/operations/merge.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/internal/gitaly/service/operations/merge.go b/internal/gitaly/service/operations/merge.go
index 6dd16f82a..25e8dc533 100644
--- a/internal/gitaly/service/operations/merge.go
+++ b/internal/gitaly/service/operations/merge.go
@@ -89,13 +89,6 @@ func validateMergeBranchRequest(request *gitalypb.UserMergeBranchRequest) error
return nil
}
-func hookErrorFromStdoutAndStderr(sout string, serr string) string {
- if len(strings.TrimSpace(serr)) > 0 {
- return serr
- }
- return sout
-}
-
func (s *Server) userMergeBranch(stream gitalypb.OperationService_UserMergeBranchServer) error {
ctx := stream.Context()