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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-31 15:05:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-31 15:05:54 +0300
commitca71f7f602aca29d87c5da01e792e3f88625157c (patch)
tree426454621f9dcbdca2913fc6cd4fbcce0aaa3d44
parent0a0645761aa2317576b99133590ff598a8d135aa (diff)
parent7a16bb54b449522f4ab9189d28a81b6ab6d376ce (diff)
Automatic merge of gitlab-org/gitaly master
-rw-r--r--internal/gitaly/service/repository/fullpath_test.go2
-rw-r--r--internal/gitaly/service/smarthttp/receive_pack_test.go16
-rw-r--r--proto/go/gitalypb/repository.pb.go23
-rw-r--r--proto/go/gitalypb/repository_grpc.pb.go6
-rw-r--r--proto/repository.proto2
5 files changed, 27 insertions, 22 deletions
diff --git a/internal/gitaly/service/repository/fullpath_test.go b/internal/gitaly/service/repository/fullpath_test.go
index 999bfec1a..85a67f584 100644
--- a/internal/gitaly/service/repository/fullpath_test.go
+++ b/internal/gitaly/service/repository/fullpath_test.go
@@ -16,6 +16,7 @@ import (
"google.golang.org/grpc/codes"
)
+//nolint:staticcheck
func TestSetFullPath(t *testing.T) {
t.Parallel()
ctx := testhelper.Context(t)
@@ -146,6 +147,7 @@ func TestSetFullPath(t *testing.T) {
})
}
+//nolint:staticcheck
func TestFullPath(t *testing.T) {
t.Parallel()
ctx := testhelper.Context(t)
diff --git a/internal/gitaly/service/smarthttp/receive_pack_test.go b/internal/gitaly/service/smarthttp/receive_pack_test.go
index 7851ac51f..4276116d4 100644
--- a/internal/gitaly/service/smarthttp/receive_pack_test.go
+++ b/internal/gitaly/service/smarthttp/receive_pack_test.go
@@ -515,19 +515,13 @@ func TestPostReceivePack_invalidObjects(t *testing.T) {
subtree := gittest.WriteTree(t, cfg, repoPath, []gittest.TreeEntry{
{Mode: "100644", Path: "file", Content: "content"},
})
- subtreeID, err := subtree.Bytes()
- require.NoError(t, err)
- var treeContents bytes.Buffer
- treeContents.WriteString("040000 subdir\x00")
- treeContents.Write(subtreeID)
-
- brokenTree := gittest.ExecOpts(t, cfg, gittest.ExecConfig{
- Stdin: &treeContents,
- }, "-C", repoPath, "hash-object", "-w", "-t", "tree", "--stdin")
+ brokenTree := gittest.WriteTree(t, cfg, repoPath, []gittest.TreeEntry{
+ {Path: "subdir", Mode: "040000", OID: subtree},
+ })
var buf bytes.Buffer
- buf.WriteString("tree " + text.ChompBytes(brokenTree) + "\n")
+ buf.WriteString("tree " + brokenTree.String() + "\n")
buf.WriteString("parent " + head + "\n")
buf.WriteString("author Au Thor <author@example.com>\n")
buf.WriteString("committer Au Thor <author@example.com>\n")
@@ -544,7 +538,7 @@ func TestPostReceivePack_invalidObjects(t *testing.T) {
t.Run(tc.desc, func(t *testing.T) {
commitBuffer := tc.prepareCommit(t, localRepoPath)
commitID := text.ChompBytes(gittest.ExecOpts(t, cfg, gittest.ExecConfig{Stdin: &commitBuffer},
- "-C", localRepoPath, "hash-object", "-t", "commit", "--stdin", "-w",
+ "-C", localRepoPath, "hash-object", "--literally", "-t", "commit", "--stdin", "-w",
))
currentHead := text.ChompBytes(gittest.Exec(t, cfg, "-C", repoPath, "rev-parse", "HEAD"))
diff --git a/proto/go/gitalypb/repository.pb.go b/proto/go/gitalypb/repository.pb.go
index 4606befdc..109776e0a 100644
--- a/proto/go/gitalypb/repository.pb.go
+++ b/proto/go/gitalypb/repository.pb.go
@@ -5555,7 +5555,7 @@ var file_repository_proto_rawDesc = []byte{
0x72, 0x79, 0x42, 0x04, 0x98, 0xc6, 0x2c, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
0x74, 0x6f, 0x72, 0x79, 0x22, 0x26, 0x0a, 0x10, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x32, 0xe3, 0x1e, 0x0a,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x32, 0xe9, 0x1e, 0x0a,
0x11, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e,
@@ -5792,20 +5792,21 @@ var file_repository_proto_rawDesc = []byte{
0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x69, 0x74,
0x61, 0x6c, 0x79, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68,
0x61, 0x62, 0x6c, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x4e, 0x0a, 0x0b, 0x53,
+ 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x51, 0x0a, 0x0b, 0x53,
0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x69, 0x74,
0x61, 0x6c, 0x79, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e,
0x53, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x12, 0x45, 0x0a, 0x08, 0x46,
- 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79,
- 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61,
- 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02,
- 0x08, 0x02, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
- 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61,
- 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f,
- 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x6e, 0x73, 0x65, 0x22, 0x09, 0x88, 0x02, 0x01, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x12, 0x48,
+ 0x0a, 0x08, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74,
+ 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x75, 0x6c,
+ 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x09, 0x88,
+ 0x02, 0x01, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c,
+ 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72,
+ 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x35, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/proto/go/gitalypb/repository_grpc.pb.go b/proto/go/gitalypb/repository_grpc.pb.go
index 84cd90f3f..07cec846d 100644
--- a/proto/go/gitalypb/repository_grpc.pb.go
+++ b/proto/go/gitalypb/repository_grpc.pb.go
@@ -133,11 +133,13 @@ type RepositoryServiceClient interface {
// To make proper use of this RPC you thus need to call OptimizeRepository,
// wait 30 minutes, and then call PruneUnreachableObjects.
PruneUnreachableObjects(ctx context.Context, in *PruneUnreachableObjectsRequest, opts ...grpc.CallOption) (*PruneUnreachableObjectsResponse, error)
+ // Deprecated: Do not use.
// SetFullPath writes the "gitlab.fullpath" configuration into the
// repository's gitconfig. This is mainly to help debugging purposes in case
// an admin inspects the repository's gitconfig such that he can easily see
// what the repository name is.
SetFullPath(ctx context.Context, in *SetFullPathRequest, opts ...grpc.CallOption) (*SetFullPathResponse, error)
+ // Deprecated: Do not use.
// FullPath reads the "gitlab.fullpath" configuration from the repository's
// gitconfig. Returns an error in case the full path has not been configured.
FullPath(ctx context.Context, in *FullPathRequest, opts ...grpc.CallOption) (*FullPathResponse, error)
@@ -821,6 +823,7 @@ func (c *repositoryServiceClient) PruneUnreachableObjects(ctx context.Context, i
return out, nil
}
+// Deprecated: Do not use.
func (c *repositoryServiceClient) SetFullPath(ctx context.Context, in *SetFullPathRequest, opts ...grpc.CallOption) (*SetFullPathResponse, error) {
out := new(SetFullPathResponse)
err := c.cc.Invoke(ctx, "/gitaly.RepositoryService/SetFullPath", in, out, opts...)
@@ -830,6 +833,7 @@ func (c *repositoryServiceClient) SetFullPath(ctx context.Context, in *SetFullPa
return out, nil
}
+// Deprecated: Do not use.
func (c *repositoryServiceClient) FullPath(ctx context.Context, in *FullPathRequest, opts ...grpc.CallOption) (*FullPathResponse, error) {
out := new(FullPathResponse)
err := c.cc.Invoke(ctx, "/gitaly.RepositoryService/FullPath", in, out, opts...)
@@ -954,11 +958,13 @@ type RepositoryServiceServer interface {
// To make proper use of this RPC you thus need to call OptimizeRepository,
// wait 30 minutes, and then call PruneUnreachableObjects.
PruneUnreachableObjects(context.Context, *PruneUnreachableObjectsRequest) (*PruneUnreachableObjectsResponse, error)
+ // Deprecated: Do not use.
// SetFullPath writes the "gitlab.fullpath" configuration into the
// repository's gitconfig. This is mainly to help debugging purposes in case
// an admin inspects the repository's gitconfig such that he can easily see
// what the repository name is.
SetFullPath(context.Context, *SetFullPathRequest) (*SetFullPathResponse, error)
+ // Deprecated: Do not use.
// FullPath reads the "gitlab.fullpath" configuration from the repository's
// gitconfig. Returns an error in case the full path has not been configured.
FullPath(context.Context, *FullPathRequest) (*FullPathResponse, error)
diff --git a/proto/repository.proto b/proto/repository.proto
index 869c9c2f7..048738b15 100644
--- a/proto/repository.proto
+++ b/proto/repository.proto
@@ -326,6 +326,7 @@ service RepositoryService {
// an admin inspects the repository's gitconfig such that he can easily see
// what the repository name is.
rpc SetFullPath(SetFullPathRequest) returns (SetFullPathResponse) {
+ option deprecated = true;
option (op_type) = {
op: MUTATOR
};
@@ -334,6 +335,7 @@ service RepositoryService {
// FullPath reads the "gitlab.fullpath" configuration from the repository's
// gitconfig. Returns an error in case the full path has not been configured.
rpc FullPath(FullPathRequest) returns (FullPathResponse) {
+ option deprecated = true;
option (op_type) = {
op: ACCESSOR
};