From 175667db7c82165e6280c6c0caeb4bf226d9d976 Mon Sep 17 00:00:00 2001 From: Erik Seliger Date: Fri, 19 Jul 2024 13:25:09 +0200 Subject: [PATCH] gitserver: Add OctopusMergeBase RPC method (#63842) This method can be used to find a common ancestor for many commit SHAs, to be used by code intel for finding visible uploads. Closes SRC-485 Test plan: Added unit tests for the several layers (client, grpc, gitcli). --- cmd/gitserver/internal/git/gitcli/exec.go | 2 +- .../internal/git/gitcli/mergebase.go | 50 + .../internal/git/gitcli/mergebase_test.go | 96 ++ cmd/gitserver/internal/git/iface.go | 19 + cmd/gitserver/internal/git/mock.go | 131 +++ cmd/gitserver/internal/git/observability.go | 12 + cmd/gitserver/internal/server_grpc.go | 48 + cmd/gitserver/internal/server_grpc_logger.go | 27 + cmd/gitserver/internal/server_grpc_test.go | 75 ++ internal/batches/sources/mocks_test.go | 137 +++ internal/gitserver/client.go | 3 + internal/gitserver/commands.go | 25 + internal/gitserver/commands_test.go | 50 + internal/gitserver/errwrap.go | 5 + internal/gitserver/mock.go | 138 +++ internal/gitserver/mocks_temp.go | 134 +++ internal/gitserver/observability.go | 2 + internal/gitserver/retry.go | 5 + internal/gitserver/v1/gitserver.pb.go | 958 ++++++++++-------- internal/gitserver/v1/gitserver.proto | 37 + internal/gitserver/v1/gitserver_grpc.pb.go | 95 ++ 21 files changed, 1646 insertions(+), 403 deletions(-) diff --git a/cmd/gitserver/internal/git/gitcli/exec.go b/cmd/gitserver/internal/git/gitcli/exec.go index 034313cc0b6..af0b9754346 100644 --- a/cmd/gitserver/internal/git/gitcli/exec.go +++ b/cmd/gitserver/internal/git/gitcli/exec.go @@ -27,7 +27,7 @@ var ( "ls-files": {"--with-tree", "-z"}, "for-each-ref": {"--format", "--points-at", "--contains", "--sort", "-creatordate", "-refname", "-HEAD"}, "tag": {"--list", "--sort", "-creatordate", "--format", "--points-at"}, - "merge-base": {"--"}, + "merge-base": {"--octopus", "--"}, "show-ref": {"--heads"}, "shortlog": {"--summary", "--numbered", "--email", "--no-merges", "--after", "--before"}, "cat-file": {"-p", "-t"}, diff --git a/cmd/gitserver/internal/git/gitcli/mergebase.go b/cmd/gitserver/internal/git/gitcli/mergebase.go index aac3e49b32b..d39d3eb5af4 100644 --- a/cmd/gitserver/internal/git/gitcli/mergebase.go +++ b/cmd/gitserver/internal/git/gitcli/mergebase.go @@ -7,6 +7,7 @@ import ( "github.com/sourcegraph/sourcegraph/internal/api" "github.com/sourcegraph/sourcegraph/internal/gitserver/gitdomain" + "github.com/sourcegraph/sourcegraph/internal/lazyregexp" "github.com/sourcegraph/sourcegraph/lib/errors" ) @@ -47,3 +48,52 @@ func (g *gitCLIBackend) MergeBase(ctx context.Context, baseRevspec, headRevspec return api.CommitID(bytes.TrimSpace(stdout)), nil } + +func (g *gitCLIBackend) MergeBaseOctopus(ctx context.Context, revspecs ...string) (api.CommitID, error) { + if len(revspecs) < 2 { + return "", errors.New("at least two revspecs must be given") + } + + args := make([]string, 0, len(revspecs)+3) + args = append(args, "merge-base", "--octopus", "--") + args = append(args, revspecs...) + + out, err := g.NewCommand( + ctx, + WithArguments(args...), + ) + if err != nil { + return "", err + } + + defer out.Close() + + stdout, err := io.ReadAll(out) + if err != nil { + // Exit code 1 and empty output most likely means that no common merge-base was found. + var e *commandFailedError + if errors.As(err, &e) { + if e.ExitStatus == 1 { + if len(e.Stderr) == 0 { + return "", nil + } + } else if e.ExitStatus == 128 && bytes.Contains(e.Stderr, []byte("fatal: Not a valid object name")) { + p := octopusNotAValidObjectRegexp.FindSubmatch(e.Stderr) + var spec string + if len(p) > 0 { + spec = string(p[1]) + } + return "", &gitdomain.RevisionNotFoundError{ + Repo: g.repoName, + Spec: spec, + } + } + } + + return "", err + } + + return api.CommitID(bytes.TrimSpace(stdout)), nil +} + +var octopusNotAValidObjectRegexp = lazyregexp.New(`fatal: Not a valid object name ([^\s]+)`) diff --git a/cmd/gitserver/internal/git/gitcli/mergebase_test.go b/cmd/gitserver/internal/git/gitcli/mergebase_test.go index 73af51a0ede..270d9013065 100644 --- a/cmd/gitserver/internal/git/gitcli/mergebase_test.go +++ b/cmd/gitserver/internal/git/gitcli/mergebase_test.go @@ -74,3 +74,99 @@ func TestGitCLIBackend_MergeBase(t *testing.T) { require.True(t, errors.HasType[*gitdomain.RevisionNotFoundError](err)) }) } + +func TestGitCLIBackend_MergeBaseOctopus(t *testing.T) { + ctx := context.Background() + + t.Run("resolves", func(t *testing.T) { + // Prepare repo state: + // Structure: + // 1 - 5 master + // \ - 2 b2 + // \ - 3 - 4 b3 + // Expected merge base of {master, b2, b3}: 1 (aka testbase) + backend := BackendWithRepoCommands(t, + "echo line1 > f", + "git add f", + "git commit -m foo --author='Foo Author '", + "git tag testbase", + + "git checkout -b b2", + "echo line2 >> f", + "git add f", + "git commit -m foo --author='Foo Author '", + "git checkout master", + + "git checkout -b b3", + "echo line3 >> f", + "git add f", + "git commit -m foo --author='Foo Author '", + "echo line4 >> f", + "git add f", + "git commit -m foo --author='Foo Author '", + + "git checkout master", + "echo line2 > f", + "git add f", + "git commit -m foo --author='Foo Author '", + ) + + wantSHA, err := backend.ResolveRevision(ctx, "testbase") + require.NoError(t, err) + require.NotEmpty(t, wantSHA) + + base, err := backend.MergeBaseOctopus(ctx, "master", "b2", "b3") + require.NoError(t, err) + require.Equal(t, wantSHA, base) + }) + t.Run("orphan branches", func(t *testing.T) { + // Prepare repo state: + backend := BackendWithRepoCommands(t, + "echo line1 > f", + "git add f", + "git commit -m foo --author='Foo Author '", + "git checkout --orphan b2", + "echo line2 >> f", + "git add f", + "git commit -m foo --author='Foo Author '", + "git checkout master", + "git checkout --orphan b3", + "echo line3 >> f", + "git add f", + "git commit -m foo --author='Foo Author '", + "git checkout master", + ) + + base, err := backend.MergeBaseOctopus(ctx, "master", "b2", "b3") + require.NoError(t, err) + require.Equal(t, api.CommitID(""), base) + }) + t.Run("not found revspec", func(t *testing.T) { + // Prepare repo state: + backend := BackendWithRepoCommands(t, + "echo line1 > f", + "git add f", + "git commit -m foo --author='Foo Author '", + ) + + // Last revspec not found + _, err := backend.MergeBaseOctopus(ctx, "master", "notfound") + require.Error(t, err) + require.True(t, errors.HasType[*gitdomain.RevisionNotFoundError](err)) + require.Equal(t, "notfound", err.(*gitdomain.RevisionNotFoundError).Spec) + + // First revspec not found + _, err = backend.MergeBaseOctopus(ctx, "notfound", "master") + require.Error(t, err) + require.True(t, errors.HasType[*gitdomain.RevisionNotFoundError](err)) + require.Equal(t, "notfound", err.(*gitdomain.RevisionNotFoundError).Spec) + }) + t.Run("less than two revspecs", func(t *testing.T) { + // Prepare repo state: + backend := BackendWithRepoCommands(t) + + _, err := backend.MergeBaseOctopus(ctx, "master") + require.Error(t, err) + require.ErrorContains(t, err, "at least two revspecs must be given") + }) +} diff --git a/cmd/gitserver/internal/git/iface.go b/cmd/gitserver/internal/git/iface.go index d82e3c43ec1..cfe3f478efb 100644 --- a/cmd/gitserver/internal/git/iface.go +++ b/cmd/gitserver/internal/git/iface.go @@ -162,6 +162,25 @@ type GitBackend interface { // This value can be used to determine if a repository changed since the last // time the hash has been computed. RefHash(ctx context.Context) ([]byte, error) + + // MergeBaseOctopus returns the octopus merge base commit sha for the specified + // revspecs. + // If no common merge base exists, an empty string is returned. + // See the following diagrams from git-merge-base docs on what octopus merge bases + // are: + // Given three commits A, B, and C, MergeBaseOctopus(A, B, C) will compute the + // best common ancestor of all commits. + // For example, with this topology: + // o---o---o---o---C + // / + // / o---o---o---B + // / / + // ---2---1---o---o---o---A + // The result of MergeBaseOctopus(A, B, C) is 2, because 2 is the + // best common ancestor of all commits. + // + // If one of the given revspecs does not exist, a RevisionNotFoundError is returned. + MergeBaseOctopus(ctx context.Context, revspecs ...string) (api.CommitID, error) } // CommitLogOrder is the order of the commits returned by CommitLog. diff --git a/cmd/gitserver/internal/git/mock.go b/cmd/gitserver/internal/git/mock.go index 28f652b1958..fcefc9e2c6c 100644 --- a/cmd/gitserver/internal/git/mock.go +++ b/cmd/gitserver/internal/git/mock.go @@ -588,6 +588,9 @@ type MockGitBackend struct { // MergeBaseFunc is an instance of a mock function object controlling // the behavior of the method MergeBase. MergeBaseFunc *GitBackendMergeBaseFunc + // MergeBaseOctopusFunc is an instance of a mock function object + // controlling the behavior of the method MergeBaseOctopus. + MergeBaseOctopusFunc *GitBackendMergeBaseOctopusFunc // RawDiffFunc is an instance of a mock function object controlling the // behavior of the method RawDiff. RawDiffFunc *GitBackendRawDiffFunc @@ -686,6 +689,11 @@ func NewMockGitBackend() *MockGitBackend { return }, }, + MergeBaseOctopusFunc: &GitBackendMergeBaseOctopusFunc{ + defaultHook: func(context.Context, ...string) (r0 api.CommitID, r1 error) { + return + }, + }, RawDiffFunc: &GitBackendRawDiffFunc{ defaultHook: func(context.Context, string, string, GitDiffComparisonType, RawDiffOpts, ...string) (r0 io.ReadCloser, r1 error) { return @@ -803,6 +811,11 @@ func NewStrictMockGitBackend() *MockGitBackend { panic("unexpected invocation of MockGitBackend.MergeBase") }, }, + MergeBaseOctopusFunc: &GitBackendMergeBaseOctopusFunc{ + defaultHook: func(context.Context, ...string) (api.CommitID, error) { + panic("unexpected invocation of MockGitBackend.MergeBaseOctopus") + }, + }, RawDiffFunc: &GitBackendRawDiffFunc{ defaultHook: func(context.Context, string, string, GitDiffComparisonType, RawDiffOpts, ...string) (io.ReadCloser, error) { panic("unexpected invocation of MockGitBackend.RawDiff") @@ -894,6 +907,9 @@ func NewMockGitBackendFrom(i GitBackend) *MockGitBackend { MergeBaseFunc: &GitBackendMergeBaseFunc{ defaultHook: i.MergeBase, }, + MergeBaseOctopusFunc: &GitBackendMergeBaseOctopusFunc{ + defaultHook: i.MergeBaseOctopus, + }, RawDiffFunc: &GitBackendRawDiffFunc{ defaultHook: i.RawDiff, }, @@ -2339,6 +2355,121 @@ func (c GitBackendMergeBaseFuncCall) Results() []interface{} { return []interface{}{c.Result0, c.Result1} } +// GitBackendMergeBaseOctopusFunc describes the behavior when the +// MergeBaseOctopus method of the parent MockGitBackend instance is invoked. +type GitBackendMergeBaseOctopusFunc struct { + defaultHook func(context.Context, ...string) (api.CommitID, error) + hooks []func(context.Context, ...string) (api.CommitID, error) + history []GitBackendMergeBaseOctopusFuncCall + mutex sync.Mutex +} + +// MergeBaseOctopus delegates to the next hook function in the queue and +// stores the parameter and result values of this invocation. +func (m *MockGitBackend) MergeBaseOctopus(v0 context.Context, v1 ...string) (api.CommitID, error) { + r0, r1 := m.MergeBaseOctopusFunc.nextHook()(v0, v1...) + m.MergeBaseOctopusFunc.appendCall(GitBackendMergeBaseOctopusFuncCall{v0, v1, r0, r1}) + return r0, r1 +} + +// SetDefaultHook sets function that is called when the MergeBaseOctopus +// method of the parent MockGitBackend instance is invoked and the hook +// queue is empty. +func (f *GitBackendMergeBaseOctopusFunc) SetDefaultHook(hook func(context.Context, ...string) (api.CommitID, error)) { + f.defaultHook = hook +} + +// PushHook adds a function to the end of hook queue. Each invocation of the +// MergeBaseOctopus method of the parent MockGitBackend instance invokes the +// hook at the front of the queue and discards it. After the queue is empty, +// the default hook function is invoked for any future action. +func (f *GitBackendMergeBaseOctopusFunc) PushHook(hook func(context.Context, ...string) (api.CommitID, error)) { + f.mutex.Lock() + f.hooks = append(f.hooks, hook) + f.mutex.Unlock() +} + +// SetDefaultReturn calls SetDefaultHook with a function that returns the +// given values. +func (f *GitBackendMergeBaseOctopusFunc) SetDefaultReturn(r0 api.CommitID, r1 error) { + f.SetDefaultHook(func(context.Context, ...string) (api.CommitID, error) { + return r0, r1 + }) +} + +// PushReturn calls PushHook with a function that returns the given values. +func (f *GitBackendMergeBaseOctopusFunc) PushReturn(r0 api.CommitID, r1 error) { + f.PushHook(func(context.Context, ...string) (api.CommitID, error) { + return r0, r1 + }) +} + +func (f *GitBackendMergeBaseOctopusFunc) nextHook() func(context.Context, ...string) (api.CommitID, error) { + f.mutex.Lock() + defer f.mutex.Unlock() + + if len(f.hooks) == 0 { + return f.defaultHook + } + + hook := f.hooks[0] + f.hooks = f.hooks[1:] + return hook +} + +func (f *GitBackendMergeBaseOctopusFunc) appendCall(r0 GitBackendMergeBaseOctopusFuncCall) { + f.mutex.Lock() + f.history = append(f.history, r0) + f.mutex.Unlock() +} + +// History returns a sequence of GitBackendMergeBaseOctopusFuncCall objects +// describing the invocations of this function. +func (f *GitBackendMergeBaseOctopusFunc) History() []GitBackendMergeBaseOctopusFuncCall { + f.mutex.Lock() + history := make([]GitBackendMergeBaseOctopusFuncCall, len(f.history)) + copy(history, f.history) + f.mutex.Unlock() + + return history +} + +// GitBackendMergeBaseOctopusFuncCall is an object that describes an +// invocation of method MergeBaseOctopus on an instance of MockGitBackend. +type GitBackendMergeBaseOctopusFuncCall struct { + // Arg0 is the value of the 1st argument passed to this method + // invocation. + Arg0 context.Context + // Arg1 is a slice containing the values of the variadic arguments + // passed to this method invocation. + Arg1 []string + // Result0 is the value of the 1st result returned from this method + // invocation. + Result0 api.CommitID + // Result1 is the value of the 2nd result returned from this method + // invocation. + Result1 error +} + +// Args returns an interface slice containing the arguments of this +// invocation. The variadic slice argument is flattened in this array such +// that one positional argument and three variadic arguments would result in +// a slice of four, not two. +func (c GitBackendMergeBaseOctopusFuncCall) Args() []interface{} { + trailing := []interface{}{} + for _, val := range c.Arg1 { + trailing = append(trailing, val) + } + + return append([]interface{}{c.Arg0}, trailing...) +} + +// Results returns an interface slice containing the results of this +// invocation. +func (c GitBackendMergeBaseOctopusFuncCall) Results() []interface{} { + return []interface{}{c.Result0, c.Result1} +} + // GitBackendRawDiffFunc describes the behavior when the RawDiff method of // the parent MockGitBackend instance is invoked. type GitBackendRawDiffFunc struct { diff --git a/cmd/gitserver/internal/git/observability.go b/cmd/gitserver/internal/git/observability.go index f18281e7da7..00289c02012 100644 --- a/cmd/gitserver/internal/git/observability.go +++ b/cmd/gitserver/internal/git/observability.go @@ -112,6 +112,16 @@ func (b *observableBackend) MergeBase(ctx context.Context, baseRevspec, headRevs return b.backend.MergeBase(ctx, baseRevspec, headRevspec) } +func (b *observableBackend) MergeBaseOctopus(ctx context.Context, revspecs ...string) (_ api.CommitID, err error) { + ctx, _, endObservation := b.operations.mergeBaseOctopus.With(ctx, &err, observation.Args{}) + defer endObservation(1, observation.Args{}) + + concurrentOps.WithLabelValues("MergeBaseOctopus").Inc() + defer concurrentOps.WithLabelValues("MergeBaseOctopus").Dec() + + return b.backend.MergeBaseOctopus(ctx, revspecs...) +} + func (b *observableBackend) Blame(ctx context.Context, commit api.CommitID, path string, opt BlameOptions) (_ BlameHunkReader, err error) { ctx, errCollector, endObservation := b.operations.blame.WithErrors(ctx, &err, observation.Args{}) ctx, cancel := context.WithCancel(ctx) @@ -536,6 +546,7 @@ type operations struct { latestCommitTimestamp *observation.Operation refHash *observation.Operation commitLog *observation.Operation + mergeBaseOctopus *observation.Operation } func newOperations(observationCtx *observation.Context) *operations { @@ -588,6 +599,7 @@ func newOperations(observationCtx *observation.Context) *operations { latestCommitTimestamp: op("latest-commit-timestamp"), refHash: op("ref-hash"), commitLog: op("commit-log"), + mergeBaseOctopus: op("merge-base-octopus"), } } diff --git a/cmd/gitserver/internal/server_grpc.go b/cmd/gitserver/internal/server_grpc.go index 52aafd2e875..e402f850768 100644 --- a/cmd/gitserver/internal/server_grpc.go +++ b/cmd/gitserver/internal/server_grpc.go @@ -687,6 +687,54 @@ func (gs *grpcServer) MergeBase(ctx context.Context, req *proto.MergeBaseRequest }, nil } +func (gs *grpcServer) MergeBaseOctopus(ctx context.Context, req *proto.MergeBaseOctopusRequest) (*proto.MergeBaseOctopusResponse, error) { + revspecs := byteSlicesToStrings(req.GetRevspecs()) + accesslog.Record( + ctx, + req.GetRepoName(), + log.Int("revspecs", len(revspecs)), + ) + + if req.GetRepoName() == "" { + return nil, status.New(codes.InvalidArgument, "repo must be specified").Err() + } + + if len(revspecs) < 2 { + return nil, status.New(codes.InvalidArgument, "at least 2 revspecs must be specified").Err() + } + + repoName := api.RepoName(req.GetRepoName()) + repoDir := gs.fs.RepoDir(repoName) + + if err := gs.checkRepoExists(repoName); err != nil { + return nil, err + } + + backend := gs.gitBackendSource(repoDir, repoName) + + sha, err := backend.MergeBaseOctopus(ctx, revspecs...) + if err != nil { + var e *gitdomain.RevisionNotFoundError + if errors.As(err, &e) { + s, err := status.New(codes.NotFound, "revision not found").WithDetails(&proto.RevisionNotFoundPayload{ + Repo: req.GetRepoName(), + Spec: e.Spec, + }) + if err != nil { + return nil, err + } + return nil, s.Err() + } + + gs.svc.LogIfCorrupt(ctx, repoName, err) + return nil, err + } + + return &proto.MergeBaseOctopusResponse{ + MergeBaseCommitSha: string(sha), + }, nil +} + func (gs *grpcServer) GetCommit(ctx context.Context, req *proto.GetCommitRequest) (*proto.GetCommitResponse, error) { accesslog.Record( ctx, diff --git a/cmd/gitserver/internal/server_grpc_logger.go b/cmd/gitserver/internal/server_grpc_logger.go index e09cc325ae2..73f4998a281 100644 --- a/cmd/gitserver/internal/server_grpc_logger.go +++ b/cmd/gitserver/internal/server_grpc_logger.go @@ -1096,6 +1096,33 @@ func commitLogRequestToLogFields(req *proto.CommitLogRequest) []log.Field { } } +func (l *loggingGRPCServer) MergeBaseOctopus(ctx context.Context, request *proto.MergeBaseOctopusRequest) (response *proto.MergeBaseOctopusResponse, err error) { + start := time.Now() + + defer func() { + elapsed := time.Since(start) + + doLog( + l.logger, + proto.GitserverService_MergeBaseOctopus_FullMethodName, + status.Code(err), + trace.Context(ctx).TraceID, + elapsed, + + mergeBaseOctopusRequestToLogFields(request)..., + ) + }() + + return l.base.MergeBaseOctopus(ctx, request) +} + +func mergeBaseOctopusRequestToLogFields(req *proto.MergeBaseOctopusRequest) []log.Field { + return []log.Field{ + log.String("repoName", req.GetRepoName()), + log.Strings("revspecs", byteSlicesToStrings(req.GetRevspecs())), + } +} + type loggingRepositoryServiceServer struct { base proto.GitserverRepositoryServiceServer logger log.Logger diff --git a/cmd/gitserver/internal/server_grpc_test.go b/cmd/gitserver/internal/server_grpc_test.go index d2db2b6815b..9924f71e1ad 100644 --- a/cmd/gitserver/internal/server_grpc_test.go +++ b/cmd/gitserver/internal/server_grpc_test.go @@ -1570,6 +1570,81 @@ func TestGRPCServer_CommitLog(t *testing.T) { }) } +func TestGRPCServer_MergeBaseOctopus(t *testing.T) { + ctx := context.Background() + t.Run("argument validation", func(t *testing.T) { + gs := &grpcServer{} + _, err := gs.MergeBaseOctopus(ctx, &v1.MergeBaseOctopusRequest{RepoName: ""}) + require.ErrorContains(t, err, "repo must be specified") + assertGRPCStatusCode(t, err, codes.InvalidArgument) + _, err = gs.MergeBaseOctopus(ctx, &v1.MergeBaseOctopusRequest{RepoName: "therepo", Revspecs: [][]byte{}}) + require.ErrorContains(t, err, "at least 2 revspecs must be specified") + assertGRPCStatusCode(t, err, codes.InvalidArgument) + _, err = gs.MergeBaseOctopus(ctx, &v1.MergeBaseOctopusRequest{RepoName: "therepo", Revspecs: [][]byte{[]byte("onlyone")}}) + require.ErrorContains(t, err, "at least 2 revspecs must be specified") + assertGRPCStatusCode(t, err, codes.InvalidArgument) + }) + t.Run("checks for uncloned repo", func(t *testing.T) { + fs := gitserverfs.NewMockFS() + fs.RepoClonedFunc.SetDefaultReturn(false, nil) + locker := NewMockRepositoryLocker() + locker.StatusFunc.SetDefaultReturn("cloning", true) + gs := &grpcServer{svc: NewMockService(), fs: fs, locker: locker} + _, err := gs.MergeBaseOctopus(ctx, &v1.MergeBaseOctopusRequest{RepoName: "therepo", Revspecs: [][]byte{[]byte("one"), []byte("two"), []byte("three")}}) + require.Error(t, err) + assertGRPCStatusCode(t, err, codes.NotFound) + assertHasGRPCErrorDetailOfType(t, err, &proto.RepoNotFoundPayload{}) + require.Contains(t, err.Error(), "repo not found") + mockassert.Called(t, fs.RepoClonedFunc) + mockassert.Called(t, locker.StatusFunc) + }) + t.Run("revision not found", func(t *testing.T) { + fs := gitserverfs.NewMockFS() + // Repo is cloned, proceed! + fs.RepoClonedFunc.SetDefaultReturn(true, nil) + gs := &grpcServer{ + svc: NewMockService(), + fs: fs, + gitBackendSource: func(common.GitDir, api.RepoName) git.GitBackend { + b := git.NewMockGitBackend() + b.MergeBaseOctopusFunc.SetDefaultReturn("", &gitdomain.RevisionNotFoundError{Repo: "therepo"}) + return b + }, + } + _, err := gs.MergeBaseOctopus(ctx, &v1.MergeBaseOctopusRequest{RepoName: "therepo", Revspecs: [][]byte{[]byte("one"), []byte("two"), []byte("three")}}) + require.Error(t, err) + assertGRPCStatusCode(t, err, codes.NotFound) + assertHasGRPCErrorDetailOfType(t, err, &proto.RevisionNotFoundPayload{}) + require.Contains(t, err.Error(), "revision not found") + }) + t.Run("e2e", func(t *testing.T) { + fs := gitserverfs.NewMockFS() + // Repo is cloned, proceed! + fs.RepoClonedFunc.SetDefaultReturn(true, nil) + b := git.NewMockGitBackend() + b.MergeBaseOctopusFunc.SetDefaultReturn("deadbeef", nil) + gs := &grpcServer{ + svc: NewMockService(), + fs: fs, + gitBackendSource: func(common.GitDir, api.RepoName) git.GitBackend { + return b + }, + } + + cli := spawnServer(t, gs) + res, err := cli.MergeBaseOctopus(ctx, &v1.MergeBaseOctopusRequest{ + RepoName: "therepo", + Revspecs: [][]byte{[]byte("one"), []byte("two"), []byte("three")}, + }) + require.NoError(t, err) + if diff := cmp.Diff(&proto.MergeBaseOctopusResponse{ + MergeBaseCommitSha: "deadbeef", + }, res, cmpopts.IgnoreUnexported(proto.MergeBaseOctopusResponse{})); diff != "" { + t.Fatalf("unexpected response (-want +got):\n%s", diff) + } + }) +} + func assertGRPCStatusCode(t *testing.T, err error, want codes.Code) { t.Helper() s, ok := status.FromError(err) diff --git a/internal/batches/sources/mocks_test.go b/internal/batches/sources/mocks_test.go index b6b7ae40460..3176beb1e35 100644 --- a/internal/batches/sources/mocks_test.go +++ b/internal/batches/sources/mocks_test.go @@ -11281,6 +11281,9 @@ type MockGitserverClient struct { // MergeBaseFunc is an instance of a mock function object controlling // the behavior of the method MergeBase. MergeBaseFunc *GitserverClientMergeBaseFunc + // MergeBaseOctopusFunc is an instance of a mock function object + // controlling the behavior of the method MergeBaseOctopus. + MergeBaseOctopusFunc *GitserverClientMergeBaseOctopusFunc // NewFileReaderFunc is an instance of a mock function object // controlling the behavior of the method NewFileReader. NewFileReaderFunc *GitserverClientNewFileReaderFunc @@ -11430,6 +11433,11 @@ func NewMockGitserverClient() *MockGitserverClient { return }, }, + MergeBaseOctopusFunc: &GitserverClientMergeBaseOctopusFunc{ + defaultHook: func(context.Context, api.RepoName, ...string) (r0 api.CommitID, r1 error) { + return + }, + }, NewFileReaderFunc: &GitserverClientNewFileReaderFunc{ defaultHook: func(context.Context, api.RepoName, api.CommitID, string) (r0 io.ReadCloser, r1 error) { return @@ -11612,6 +11620,11 @@ func NewStrictMockGitserverClient() *MockGitserverClient { panic("unexpected invocation of MockGitserverClient.MergeBase") }, }, + MergeBaseOctopusFunc: &GitserverClientMergeBaseOctopusFunc{ + defaultHook: func(context.Context, api.RepoName, ...string) (api.CommitID, error) { + panic("unexpected invocation of MockGitserverClient.MergeBaseOctopus") + }, + }, NewFileReaderFunc: &GitserverClientNewFileReaderFunc{ defaultHook: func(context.Context, api.RepoName, api.CommitID, string) (io.ReadCloser, error) { panic("unexpected invocation of MockGitserverClient.NewFileReader") @@ -11757,6 +11770,9 @@ func NewMockGitserverClientFrom(i gitserver.Client) *MockGitserverClient { MergeBaseFunc: &GitserverClientMergeBaseFunc{ defaultHook: i.MergeBase, }, + MergeBaseOctopusFunc: &GitserverClientMergeBaseOctopusFunc{ + defaultHook: i.MergeBaseOctopus, + }, NewFileReaderFunc: &GitserverClientNewFileReaderFunc{ defaultHook: i.NewFileReader, }, @@ -13923,6 +13939,127 @@ func (c GitserverClientMergeBaseFuncCall) Results() []interface{} { return []interface{}{c.Result0, c.Result1} } +// GitserverClientMergeBaseOctopusFunc describes the behavior when the +// MergeBaseOctopus method of the parent MockGitserverClient instance is +// invoked. +type GitserverClientMergeBaseOctopusFunc struct { + defaultHook func(context.Context, api.RepoName, ...string) (api.CommitID, error) + hooks []func(context.Context, api.RepoName, ...string) (api.CommitID, error) + history []GitserverClientMergeBaseOctopusFuncCall + mutex sync.Mutex +} + +// MergeBaseOctopus delegates to the next hook function in the queue and +// stores the parameter and result values of this invocation. +func (m *MockGitserverClient) MergeBaseOctopus(v0 context.Context, v1 api.RepoName, v2 ...string) (api.CommitID, error) { + r0, r1 := m.MergeBaseOctopusFunc.nextHook()(v0, v1, v2...) + m.MergeBaseOctopusFunc.appendCall(GitserverClientMergeBaseOctopusFuncCall{v0, v1, v2, r0, r1}) + return r0, r1 +} + +// SetDefaultHook sets function that is called when the MergeBaseOctopus +// method of the parent MockGitserverClient instance is invoked and the hook +// queue is empty. +func (f *GitserverClientMergeBaseOctopusFunc) SetDefaultHook(hook func(context.Context, api.RepoName, ...string) (api.CommitID, error)) { + f.defaultHook = hook +} + +// PushHook adds a function to the end of hook queue. Each invocation of the +// MergeBaseOctopus method of the parent MockGitserverClient instance +// invokes the hook at the front of the queue and discards it. After the +// queue is empty, the default hook function is invoked for any future +// action. +func (f *GitserverClientMergeBaseOctopusFunc) PushHook(hook func(context.Context, api.RepoName, ...string) (api.CommitID, error)) { + f.mutex.Lock() + f.hooks = append(f.hooks, hook) + f.mutex.Unlock() +} + +// SetDefaultReturn calls SetDefaultHook with a function that returns the +// given values. +func (f *GitserverClientMergeBaseOctopusFunc) SetDefaultReturn(r0 api.CommitID, r1 error) { + f.SetDefaultHook(func(context.Context, api.RepoName, ...string) (api.CommitID, error) { + return r0, r1 + }) +} + +// PushReturn calls PushHook with a function that returns the given values. +func (f *GitserverClientMergeBaseOctopusFunc) PushReturn(r0 api.CommitID, r1 error) { + f.PushHook(func(context.Context, api.RepoName, ...string) (api.CommitID, error) { + return r0, r1 + }) +} + +func (f *GitserverClientMergeBaseOctopusFunc) nextHook() func(context.Context, api.RepoName, ...string) (api.CommitID, error) { + f.mutex.Lock() + defer f.mutex.Unlock() + + if len(f.hooks) == 0 { + return f.defaultHook + } + + hook := f.hooks[0] + f.hooks = f.hooks[1:] + return hook +} + +func (f *GitserverClientMergeBaseOctopusFunc) appendCall(r0 GitserverClientMergeBaseOctopusFuncCall) { + f.mutex.Lock() + f.history = append(f.history, r0) + f.mutex.Unlock() +} + +// History returns a sequence of GitserverClientMergeBaseOctopusFuncCall +// objects describing the invocations of this function. +func (f *GitserverClientMergeBaseOctopusFunc) History() []GitserverClientMergeBaseOctopusFuncCall { + f.mutex.Lock() + history := make([]GitserverClientMergeBaseOctopusFuncCall, len(f.history)) + copy(history, f.history) + f.mutex.Unlock() + + return history +} + +// GitserverClientMergeBaseOctopusFuncCall is an object that describes an +// invocation of method MergeBaseOctopus on an instance of +// MockGitserverClient. +type GitserverClientMergeBaseOctopusFuncCall struct { + // Arg0 is the value of the 1st argument passed to this method + // invocation. + Arg0 context.Context + // Arg1 is the value of the 2nd argument passed to this method + // invocation. + Arg1 api.RepoName + // Arg2 is a slice containing the values of the variadic arguments + // passed to this method invocation. + Arg2 []string + // Result0 is the value of the 1st result returned from this method + // invocation. + Result0 api.CommitID + // Result1 is the value of the 2nd result returned from this method + // invocation. + Result1 error +} + +// Args returns an interface slice containing the arguments of this +// invocation. The variadic slice argument is flattened in this array such +// that one positional argument and three variadic arguments would result in +// a slice of four, not two. +func (c GitserverClientMergeBaseOctopusFuncCall) Args() []interface{} { + trailing := []interface{}{} + for _, val := range c.Arg2 { + trailing = append(trailing, val) + } + + return append([]interface{}{c.Arg0, c.Arg1}, trailing...) +} + +// Results returns an interface slice containing the results of this +// invocation. +func (c GitserverClientMergeBaseOctopusFuncCall) Results() []interface{} { + return []interface{}{c.Result0, c.Result1} +} + // GitserverClientNewFileReaderFunc describes the behavior when the // NewFileReader method of the parent MockGitserverClient instance is // invoked. diff --git a/internal/gitserver/client.go b/internal/gitserver/client.go index 489617940dc..abb279e798f 100644 --- a/internal/gitserver/client.go +++ b/internal/gitserver/client.go @@ -387,6 +387,9 @@ type Client interface { // MergeBase returns the merge base commit sha for the specified revspecs. MergeBase(ctx context.Context, repo api.RepoName, base, head string) (api.CommitID, error) + // MergeBaseOctopus returns the octopus merge base commit sha for the specified revspecs. + MergeBaseOctopus(ctx context.Context, repo api.RepoName, revspecs ...string) (api.CommitID, error) + RepoCloneProgress(context.Context, api.RepoName) (*protocol.RepoCloneProgress, error) // ResolveRevision will return the absolute commit for a commit-ish spec. If spec is empty, HEAD is diff --git a/internal/gitserver/commands.go b/internal/gitserver/commands.go index a30cdf3f89b..6a74fd1b0dc 100644 --- a/internal/gitserver/commands.go +++ b/internal/gitserver/commands.go @@ -714,6 +714,31 @@ func (c *clientImplementor) MergeBase(ctx context.Context, repo api.RepoName, ba return api.CommitID(res.GetMergeBaseCommitSha()), nil } +func (c *clientImplementor) MergeBaseOctopus(ctx context.Context, repo api.RepoName, revspecs ...string) (_ api.CommitID, err error) { + ctx, _, endObservation := c.operations.mergeBaseOctopus.With(ctx, &err, observation.Args{ + MetricLabelValues: []string{c.scope}, + Attrs: []attribute.KeyValue{ + attribute.StringSlice("revspecs", revspecs), + }, + }) + defer endObservation(1, observation.Args{}) + + client, err := c.clientSource.ClientForRepo(ctx, repo) + if err != nil { + return "", err + } + + res, err := client.MergeBaseOctopus(ctx, &proto.MergeBaseOctopusRequest{ + RepoName: string(repo), + Revspecs: stringsToByteSlices(revspecs), + }) + if err != nil { + return "", err + } + + return api.CommitID(res.GetMergeBaseCommitSha()), nil +} + // BehindAhead returns the behind/ahead commit counts information for right vs. left (both Git // revspecs). func (c *clientImplementor) BehindAhead(ctx context.Context, repo api.RepoName, left, right string) (_ *gitdomain.BehindAhead, err error) { diff --git a/internal/gitserver/commands_test.go b/internal/gitserver/commands_test.go index 35738fa7eed..a0a7581329e 100644 --- a/internal/gitserver/commands_test.go +++ b/internal/gitserver/commands_test.go @@ -2098,6 +2098,56 @@ func TestClient_Commits(t *testing.T) { }) } +func TestClient_MergeBaseOctopus(t *testing.T) { + t.Run("correctly returns server response", func(t *testing.T) { + source := NewTestClientSource(t, []string{"gitserver"}, func(o *TestClientSourceOptions) { + o.ClientFunc = func(cc *grpc.ClientConn) proto.GitserverServiceClient { + c := NewMockGitserverServiceClient() + c.MergeBaseOctopusFunc.SetDefaultReturn(&proto.MergeBaseOctopusResponse{MergeBaseCommitSha: "deadbeef"}, nil) + return c + } + }) + + c := NewTestClient(t).WithClientSource(source) + + sha, err := c.MergeBaseOctopus(context.Background(), "repo", "master", "b2") + require.NoError(t, err) + require.Equal(t, api.CommitID("deadbeef"), sha) + }) + t.Run("returns empty for empty merge base", func(t *testing.T) { + source := NewTestClientSource(t, []string{"gitserver"}, func(o *TestClientSourceOptions) { + o.ClientFunc = func(cc *grpc.ClientConn) proto.GitserverServiceClient { + c := NewMockGitserverServiceClient() + c.MergeBaseOctopusFunc.SetDefaultReturn(&proto.MergeBaseOctopusResponse{MergeBaseCommitSha: ""}, nil) + return c + } + }) + + c := NewTestClient(t).WithClientSource(source) + + sha, err := c.MergeBaseOctopus(context.Background(), "repo", "master", "b2") + require.NoError(t, err) + require.Equal(t, api.CommitID(""), sha) + }) + t.Run("revision not found", func(t *testing.T) { + source := NewTestClientSource(t, []string{"gitserver"}, func(o *TestClientSourceOptions) { + o.ClientFunc = func(cc *grpc.ClientConn) proto.GitserverServiceClient { + c := NewMockGitserverServiceClient() + s, err := status.New(codes.NotFound, "bad revision").WithDetails(&proto.RevisionNotFoundPayload{Repo: "repo"}) + require.NoError(t, err) + c.MergeBaseOctopusFunc.SetDefaultReturn(nil, s.Err()) + return c + } + }) + + c := NewTestClient(t).WithClientSource(source) + + _, err := c.MergeBaseOctopus(context.Background(), "repo", "master", "b2") + require.Error(t, err) + require.True(t, errors.HasType[*gitdomain.RevisionNotFoundError](err)) + }) +} + func mustParseTime(layout, value string) time.Time { tm, err := time.Parse(layout, value) if err != nil { diff --git a/internal/gitserver/errwrap.go b/internal/gitserver/errwrap.go index afaea471695..4d81d766812 100644 --- a/internal/gitserver/errwrap.go +++ b/internal/gitserver/errwrap.go @@ -362,4 +362,9 @@ func (r *errorTranslatingCommitLogClient) Recv() (*proto.CommitLogResponse, erro return res, convertGRPCErrorToGitDomainError(err) } +func (r *errorTranslatingClient) MergeBaseOctopus(ctx context.Context, in *proto.MergeBaseOctopusRequest, opts ...grpc.CallOption) (*proto.MergeBaseOctopusResponse, error) { + res, err := r.base.MergeBaseOctopus(ctx, in, opts...) + return res, convertGRPCErrorToGitDomainError(err) +} + var _ proto.GitserverServiceClient = &errorTranslatingClient{} diff --git a/internal/gitserver/mock.go b/internal/gitserver/mock.go index 90341968b28..d453bab4779 100644 --- a/internal/gitserver/mock.go +++ b/internal/gitserver/mock.go @@ -78,6 +78,9 @@ type MockGitserverServiceClient struct { // MergeBaseFunc is an instance of a mock function object controlling // the behavior of the method MergeBase. MergeBaseFunc *GitserverServiceClientMergeBaseFunc + // MergeBaseOctopusFunc is an instance of a mock function object + // controlling the behavior of the method MergeBaseOctopus. + MergeBaseOctopusFunc *GitserverServiceClientMergeBaseOctopusFunc // PerforceGetChangelistFunc is an instance of a mock function object // controlling the behavior of the method PerforceGetChangelist. PerforceGetChangelistFunc *GitserverServiceClientPerforceGetChangelistFunc @@ -219,6 +222,11 @@ func NewMockGitserverServiceClient() *MockGitserverServiceClient { return }, }, + MergeBaseOctopusFunc: &GitserverServiceClientMergeBaseOctopusFunc{ + defaultHook: func(context.Context, *v1.MergeBaseOctopusRequest, ...grpc.CallOption) (r0 *v1.MergeBaseOctopusResponse, r1 error) { + return + }, + }, PerforceGetChangelistFunc: &GitserverServiceClientPerforceGetChangelistFunc{ defaultHook: func(context.Context, *v1.PerforceGetChangelistRequest, ...grpc.CallOption) (r0 *v1.PerforceGetChangelistResponse, r1 error) { return @@ -387,6 +395,11 @@ func NewStrictMockGitserverServiceClient() *MockGitserverServiceClient { panic("unexpected invocation of MockGitserverServiceClient.MergeBase") }, }, + MergeBaseOctopusFunc: &GitserverServiceClientMergeBaseOctopusFunc{ + defaultHook: func(context.Context, *v1.MergeBaseOctopusRequest, ...grpc.CallOption) (*v1.MergeBaseOctopusResponse, error) { + panic("unexpected invocation of MockGitserverServiceClient.MergeBaseOctopus") + }, + }, PerforceGetChangelistFunc: &GitserverServiceClientPerforceGetChangelistFunc{ defaultHook: func(context.Context, *v1.PerforceGetChangelistRequest, ...grpc.CallOption) (*v1.PerforceGetChangelistResponse, error) { panic("unexpected invocation of MockGitserverServiceClient.PerforceGetChangelist") @@ -517,6 +530,9 @@ func NewMockGitserverServiceClientFrom(i v1.GitserverServiceClient) *MockGitserv MergeBaseFunc: &GitserverServiceClientMergeBaseFunc{ defaultHook: i.MergeBase, }, + MergeBaseOctopusFunc: &GitserverServiceClientMergeBaseOctopusFunc{ + defaultHook: i.MergeBaseOctopus, + }, PerforceGetChangelistFunc: &GitserverServiceClientPerforceGetChangelistFunc{ defaultHook: i.PerforceGetChangelist, }, @@ -2856,6 +2872,128 @@ func (c GitserverServiceClientMergeBaseFuncCall) Results() []interface{} { return []interface{}{c.Result0, c.Result1} } +// GitserverServiceClientMergeBaseOctopusFunc describes the behavior when +// the MergeBaseOctopus method of the parent MockGitserverServiceClient +// instance is invoked. +type GitserverServiceClientMergeBaseOctopusFunc struct { + defaultHook func(context.Context, *v1.MergeBaseOctopusRequest, ...grpc.CallOption) (*v1.MergeBaseOctopusResponse, error) + hooks []func(context.Context, *v1.MergeBaseOctopusRequest, ...grpc.CallOption) (*v1.MergeBaseOctopusResponse, error) + history []GitserverServiceClientMergeBaseOctopusFuncCall + mutex sync.Mutex +} + +// MergeBaseOctopus delegates to the next hook function in the queue and +// stores the parameter and result values of this invocation. +func (m *MockGitserverServiceClient) MergeBaseOctopus(v0 context.Context, v1 *v1.MergeBaseOctopusRequest, v2 ...grpc.CallOption) (*v1.MergeBaseOctopusResponse, error) { + r0, r1 := m.MergeBaseOctopusFunc.nextHook()(v0, v1, v2...) + m.MergeBaseOctopusFunc.appendCall(GitserverServiceClientMergeBaseOctopusFuncCall{v0, v1, v2, r0, r1}) + return r0, r1 +} + +// SetDefaultHook sets function that is called when the MergeBaseOctopus +// method of the parent MockGitserverServiceClient instance is invoked and +// the hook queue is empty. +func (f *GitserverServiceClientMergeBaseOctopusFunc) SetDefaultHook(hook func(context.Context, *v1.MergeBaseOctopusRequest, ...grpc.CallOption) (*v1.MergeBaseOctopusResponse, error)) { + f.defaultHook = hook +} + +// PushHook adds a function to the end of hook queue. Each invocation of the +// MergeBaseOctopus method of the parent MockGitserverServiceClient instance +// invokes the hook at the front of the queue and discards it. After the +// queue is empty, the default hook function is invoked for any future +// action. +func (f *GitserverServiceClientMergeBaseOctopusFunc) PushHook(hook func(context.Context, *v1.MergeBaseOctopusRequest, ...grpc.CallOption) (*v1.MergeBaseOctopusResponse, error)) { + f.mutex.Lock() + f.hooks = append(f.hooks, hook) + f.mutex.Unlock() +} + +// SetDefaultReturn calls SetDefaultHook with a function that returns the +// given values. +func (f *GitserverServiceClientMergeBaseOctopusFunc) SetDefaultReturn(r0 *v1.MergeBaseOctopusResponse, r1 error) { + f.SetDefaultHook(func(context.Context, *v1.MergeBaseOctopusRequest, ...grpc.CallOption) (*v1.MergeBaseOctopusResponse, error) { + return r0, r1 + }) +} + +// PushReturn calls PushHook with a function that returns the given values. +func (f *GitserverServiceClientMergeBaseOctopusFunc) PushReturn(r0 *v1.MergeBaseOctopusResponse, r1 error) { + f.PushHook(func(context.Context, *v1.MergeBaseOctopusRequest, ...grpc.CallOption) (*v1.MergeBaseOctopusResponse, error) { + return r0, r1 + }) +} + +func (f *GitserverServiceClientMergeBaseOctopusFunc) nextHook() func(context.Context, *v1.MergeBaseOctopusRequest, ...grpc.CallOption) (*v1.MergeBaseOctopusResponse, error) { + f.mutex.Lock() + defer f.mutex.Unlock() + + if len(f.hooks) == 0 { + return f.defaultHook + } + + hook := f.hooks[0] + f.hooks = f.hooks[1:] + return hook +} + +func (f *GitserverServiceClientMergeBaseOctopusFunc) appendCall(r0 GitserverServiceClientMergeBaseOctopusFuncCall) { + f.mutex.Lock() + f.history = append(f.history, r0) + f.mutex.Unlock() +} + +// History returns a sequence of +// GitserverServiceClientMergeBaseOctopusFuncCall objects describing the +// invocations of this function. +func (f *GitserverServiceClientMergeBaseOctopusFunc) History() []GitserverServiceClientMergeBaseOctopusFuncCall { + f.mutex.Lock() + history := make([]GitserverServiceClientMergeBaseOctopusFuncCall, len(f.history)) + copy(history, f.history) + f.mutex.Unlock() + + return history +} + +// GitserverServiceClientMergeBaseOctopusFuncCall is an object that +// describes an invocation of method MergeBaseOctopus on an instance of +// MockGitserverServiceClient. +type GitserverServiceClientMergeBaseOctopusFuncCall struct { + // Arg0 is the value of the 1st argument passed to this method + // invocation. + Arg0 context.Context + // Arg1 is the value of the 2nd argument passed to this method + // invocation. + Arg1 *v1.MergeBaseOctopusRequest + // Arg2 is a slice containing the values of the variadic arguments + // passed to this method invocation. + Arg2 []grpc.CallOption + // Result0 is the value of the 1st result returned from this method + // invocation. + Result0 *v1.MergeBaseOctopusResponse + // Result1 is the value of the 2nd result returned from this method + // invocation. + Result1 error +} + +// Args returns an interface slice containing the arguments of this +// invocation. The variadic slice argument is flattened in this array such +// that one positional argument and three variadic arguments would result in +// a slice of four, not two. +func (c GitserverServiceClientMergeBaseOctopusFuncCall) Args() []interface{} { + trailing := []interface{}{} + for _, val := range c.Arg2 { + trailing = append(trailing, val) + } + + return append([]interface{}{c.Arg0, c.Arg1}, trailing...) +} + +// Results returns an interface slice containing the results of this +// invocation. +func (c GitserverServiceClientMergeBaseOctopusFuncCall) Results() []interface{} { + return []interface{}{c.Result0, c.Result1} +} + // GitserverServiceClientPerforceGetChangelistFunc describes the behavior // when the PerforceGetChangelist method of the parent // MockGitserverServiceClient instance is invoked. diff --git a/internal/gitserver/mocks_temp.go b/internal/gitserver/mocks_temp.go index 4e979ec42bc..d6a10c57da4 100644 --- a/internal/gitserver/mocks_temp.go +++ b/internal/gitserver/mocks_temp.go @@ -81,6 +81,9 @@ type MockClient struct { // MergeBaseFunc is an instance of a mock function object controlling // the behavior of the method MergeBase. MergeBaseFunc *ClientMergeBaseFunc + // MergeBaseOctopusFunc is an instance of a mock function object + // controlling the behavior of the method MergeBaseOctopus. + MergeBaseOctopusFunc *ClientMergeBaseOctopusFunc // NewFileReaderFunc is an instance of a mock function object // controlling the behavior of the method NewFileReader. NewFileReaderFunc *ClientNewFileReaderFunc @@ -230,6 +233,11 @@ func NewMockClient() *MockClient { return }, }, + MergeBaseOctopusFunc: &ClientMergeBaseOctopusFunc{ + defaultHook: func(context.Context, api.RepoName, ...string) (r0 api.CommitID, r1 error) { + return + }, + }, NewFileReaderFunc: &ClientNewFileReaderFunc{ defaultHook: func(context.Context, api.RepoName, api.CommitID, string) (r0 io.ReadCloser, r1 error) { return @@ -412,6 +420,11 @@ func NewStrictMockClient() *MockClient { panic("unexpected invocation of MockClient.MergeBase") }, }, + MergeBaseOctopusFunc: &ClientMergeBaseOctopusFunc{ + defaultHook: func(context.Context, api.RepoName, ...string) (api.CommitID, error) { + panic("unexpected invocation of MockClient.MergeBaseOctopus") + }, + }, NewFileReaderFunc: &ClientNewFileReaderFunc{ defaultHook: func(context.Context, api.RepoName, api.CommitID, string) (io.ReadCloser, error) { panic("unexpected invocation of MockClient.NewFileReader") @@ -556,6 +569,9 @@ func NewMockClientFrom(i Client) *MockClient { MergeBaseFunc: &ClientMergeBaseFunc{ defaultHook: i.MergeBase, }, + MergeBaseOctopusFunc: &ClientMergeBaseOctopusFunc{ + defaultHook: i.MergeBaseOctopus, + }, NewFileReaderFunc: &ClientNewFileReaderFunc{ defaultHook: i.NewFileReader, }, @@ -2687,6 +2703,124 @@ func (c ClientMergeBaseFuncCall) Results() []interface{} { return []interface{}{c.Result0, c.Result1} } +// ClientMergeBaseOctopusFunc describes the behavior when the +// MergeBaseOctopus method of the parent MockClient instance is invoked. +type ClientMergeBaseOctopusFunc struct { + defaultHook func(context.Context, api.RepoName, ...string) (api.CommitID, error) + hooks []func(context.Context, api.RepoName, ...string) (api.CommitID, error) + history []ClientMergeBaseOctopusFuncCall + mutex sync.Mutex +} + +// MergeBaseOctopus delegates to the next hook function in the queue and +// stores the parameter and result values of this invocation. +func (m *MockClient) MergeBaseOctopus(v0 context.Context, v1 api.RepoName, v2 ...string) (api.CommitID, error) { + r0, r1 := m.MergeBaseOctopusFunc.nextHook()(v0, v1, v2...) + m.MergeBaseOctopusFunc.appendCall(ClientMergeBaseOctopusFuncCall{v0, v1, v2, r0, r1}) + return r0, r1 +} + +// SetDefaultHook sets function that is called when the MergeBaseOctopus +// method of the parent MockClient instance is invoked and the hook queue is +// empty. +func (f *ClientMergeBaseOctopusFunc) SetDefaultHook(hook func(context.Context, api.RepoName, ...string) (api.CommitID, error)) { + f.defaultHook = hook +} + +// PushHook adds a function to the end of hook queue. Each invocation of the +// MergeBaseOctopus method of the parent MockClient instance invokes the +// hook at the front of the queue and discards it. After the queue is empty, +// the default hook function is invoked for any future action. +func (f *ClientMergeBaseOctopusFunc) PushHook(hook func(context.Context, api.RepoName, ...string) (api.CommitID, error)) { + f.mutex.Lock() + f.hooks = append(f.hooks, hook) + f.mutex.Unlock() +} + +// SetDefaultReturn calls SetDefaultHook with a function that returns the +// given values. +func (f *ClientMergeBaseOctopusFunc) SetDefaultReturn(r0 api.CommitID, r1 error) { + f.SetDefaultHook(func(context.Context, api.RepoName, ...string) (api.CommitID, error) { + return r0, r1 + }) +} + +// PushReturn calls PushHook with a function that returns the given values. +func (f *ClientMergeBaseOctopusFunc) PushReturn(r0 api.CommitID, r1 error) { + f.PushHook(func(context.Context, api.RepoName, ...string) (api.CommitID, error) { + return r0, r1 + }) +} + +func (f *ClientMergeBaseOctopusFunc) nextHook() func(context.Context, api.RepoName, ...string) (api.CommitID, error) { + f.mutex.Lock() + defer f.mutex.Unlock() + + if len(f.hooks) == 0 { + return f.defaultHook + } + + hook := f.hooks[0] + f.hooks = f.hooks[1:] + return hook +} + +func (f *ClientMergeBaseOctopusFunc) appendCall(r0 ClientMergeBaseOctopusFuncCall) { + f.mutex.Lock() + f.history = append(f.history, r0) + f.mutex.Unlock() +} + +// History returns a sequence of ClientMergeBaseOctopusFuncCall objects +// describing the invocations of this function. +func (f *ClientMergeBaseOctopusFunc) History() []ClientMergeBaseOctopusFuncCall { + f.mutex.Lock() + history := make([]ClientMergeBaseOctopusFuncCall, len(f.history)) + copy(history, f.history) + f.mutex.Unlock() + + return history +} + +// ClientMergeBaseOctopusFuncCall is an object that describes an invocation +// of method MergeBaseOctopus on an instance of MockClient. +type ClientMergeBaseOctopusFuncCall struct { + // Arg0 is the value of the 1st argument passed to this method + // invocation. + Arg0 context.Context + // Arg1 is the value of the 2nd argument passed to this method + // invocation. + Arg1 api.RepoName + // Arg2 is a slice containing the values of the variadic arguments + // passed to this method invocation. + Arg2 []string + // Result0 is the value of the 1st result returned from this method + // invocation. + Result0 api.CommitID + // Result1 is the value of the 2nd result returned from this method + // invocation. + Result1 error +} + +// Args returns an interface slice containing the arguments of this +// invocation. The variadic slice argument is flattened in this array such +// that one positional argument and three variadic arguments would result in +// a slice of four, not two. +func (c ClientMergeBaseOctopusFuncCall) Args() []interface{} { + trailing := []interface{}{} + for _, val := range c.Arg2 { + trailing = append(trailing, val) + } + + return append([]interface{}{c.Arg0, c.Arg1}, trailing...) +} + +// Results returns an interface slice containing the results of this +// invocation. +func (c ClientMergeBaseOctopusFuncCall) Results() []interface{} { + return []interface{}{c.Result0, c.Result1} +} + // ClientNewFileReaderFunc describes the behavior when the NewFileReader // method of the parent MockClient instance is invoked. type ClientNewFileReaderFunc struct { diff --git a/internal/gitserver/observability.go b/internal/gitserver/observability.go index be2bb0eafca..28485840bce 100644 --- a/internal/gitserver/observability.go +++ b/internal/gitserver/observability.go @@ -46,6 +46,7 @@ type operations struct { getDefaultBranch *observation.Operation diff *observation.Operation changedFiles *observation.Operation + mergeBaseOctopus *observation.Operation } func newOperations(observationCtx *observation.Context) *operations { @@ -127,6 +128,7 @@ func newOperations(observationCtx *observation.Context) *operations { getDefaultBranch: op("GetDefaultBranch"), diff: op("Diff"), changedFiles: op("ChangedFiles"), + mergeBaseOctopus: op("MergeBaseOctopus"), } } diff --git a/internal/gitserver/retry.go b/internal/gitserver/retry.go index e2eece7f55a..1ce876d64ea 100644 --- a/internal/gitserver/retry.go +++ b/internal/gitserver/retry.go @@ -185,4 +185,9 @@ func (r *automaticRetryClient) CommitLog(ctx context.Context, in *proto.CommitLo return r.base.CommitLog(ctx, in, opts...) } +func (r *automaticRetryClient) MergeBaseOctopus(ctx context.Context, in *proto.MergeBaseOctopusRequest, opts ...grpc.CallOption) (*proto.MergeBaseOctopusResponse, error) { + opts = append(defaults.RetryPolicy, opts...) + return r.base.MergeBaseOctopus(ctx, in, opts...) +} + var _ proto.GitserverServiceClient = &automaticRetryClient{} diff --git a/internal/gitserver/v1/gitserver.pb.go b/internal/gitserver/v1/gitserver.pb.go index 1e8c042401e..36a826ebd8f 100644 --- a/internal/gitserver/v1/gitserver.pb.go +++ b/internal/gitserver/v1/gitserver.pb.go @@ -447,7 +447,7 @@ func (x ChangedFile_Status) Number() protoreflect.EnumNumber { // Deprecated: Use ChangedFile_Status.Descriptor instead. func (ChangedFile_Status) EnumDescriptor() ([]byte, []int) { - return file_gitserver_proto_rawDescGZIP(), []int{104, 0} + return file_gitserver_proto_rawDescGZIP(), []int{106, 0} } type ListRepositoriesRequest struct { @@ -6677,6 +6677,115 @@ func (x *MergeBaseResponse) GetMergeBaseCommitSha() string { return "" } +// MergeBaseOctopusRequest is a request to find the octopus merge base of revspecs. +type MergeBaseOctopusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // repo_name is the name of the repo to get the octopus merge base for. + // Note: We use field ID 2 here to reserve 1 for a future repo int32 field. + RepoName string `protobuf:"bytes,2,opt,name=repo_name,json=repoName,proto3" json:"repo_name,omitempty"` + // revspecs are the revspecs to consider for merge-base. For now, we allow non-utf8 + // revspecs. + Revspecs [][]byte `protobuf:"bytes,3,rep,name=revspecs,proto3" json:"revspecs,omitempty"` +} + +func (x *MergeBaseOctopusRequest) Reset() { + *x = MergeBaseOctopusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitserver_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MergeBaseOctopusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MergeBaseOctopusRequest) ProtoMessage() {} + +func (x *MergeBaseOctopusRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitserver_proto_msgTypes[98] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MergeBaseOctopusRequest.ProtoReflect.Descriptor instead. +func (*MergeBaseOctopusRequest) Descriptor() ([]byte, []int) { + return file_gitserver_proto_rawDescGZIP(), []int{98} +} + +func (x *MergeBaseOctopusRequest) GetRepoName() string { + if x != nil { + return x.RepoName + } + return "" +} + +func (x *MergeBaseOctopusRequest) GetRevspecs() [][]byte { + if x != nil { + return x.Revspecs + } + return nil +} + +// MergeBaseOctopusResponse is the response from finding the octopus merge base of +// the given revspecs. +type MergeBaseOctopusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MergeBaseCommitSha string `protobuf:"bytes,1,opt,name=merge_base_commit_sha,json=mergeBaseCommitSha,proto3" json:"merge_base_commit_sha,omitempty"` +} + +func (x *MergeBaseOctopusResponse) Reset() { + *x = MergeBaseOctopusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitserver_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MergeBaseOctopusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MergeBaseOctopusResponse) ProtoMessage() {} + +func (x *MergeBaseOctopusResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitserver_proto_msgTypes[99] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MergeBaseOctopusResponse.ProtoReflect.Descriptor instead. +func (*MergeBaseOctopusResponse) Descriptor() ([]byte, []int) { + return file_gitserver_proto_rawDescGZIP(), []int{99} +} + +func (x *MergeBaseOctopusResponse) GetMergeBaseCommitSha() string { + if x != nil { + return x.MergeBaseCommitSha + } + return "" +} + // FirstEverCommitRequest is a request to get the first ever commit in a repo. type FirstEverCommitRequest struct { state protoimpl.MessageState @@ -6691,7 +6800,7 @@ type FirstEverCommitRequest struct { func (x *FirstEverCommitRequest) Reset() { *x = FirstEverCommitRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[98] + mi := &file_gitserver_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6704,7 +6813,7 @@ func (x *FirstEverCommitRequest) String() string { func (*FirstEverCommitRequest) ProtoMessage() {} func (x *FirstEverCommitRequest) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[98] + mi := &file_gitserver_proto_msgTypes[100] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6717,7 +6826,7 @@ func (x *FirstEverCommitRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FirstEverCommitRequest.ProtoReflect.Descriptor instead. func (*FirstEverCommitRequest) Descriptor() ([]byte, []int) { - return file_gitserver_proto_rawDescGZIP(), []int{98} + return file_gitserver_proto_rawDescGZIP(), []int{100} } func (x *FirstEverCommitRequest) GetRepoName() string { @@ -6740,7 +6849,7 @@ type FirstEverCommitResponse struct { func (x *FirstEverCommitResponse) Reset() { *x = FirstEverCommitResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[99] + mi := &file_gitserver_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6753,7 +6862,7 @@ func (x *FirstEverCommitResponse) String() string { func (*FirstEverCommitResponse) ProtoMessage() {} func (x *FirstEverCommitResponse) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[99] + mi := &file_gitserver_proto_msgTypes[101] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6766,7 +6875,7 @@ func (x *FirstEverCommitResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FirstEverCommitResponse.ProtoReflect.Descriptor instead. func (*FirstEverCommitResponse) Descriptor() ([]byte, []int) { - return file_gitserver_proto_rawDescGZIP(), []int{99} + return file_gitserver_proto_rawDescGZIP(), []int{101} } func (x *FirstEverCommitResponse) GetCommit() *GitCommit { @@ -6795,7 +6904,7 @@ type BehindAheadRequest struct { func (x *BehindAheadRequest) Reset() { *x = BehindAheadRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[100] + mi := &file_gitserver_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6808,7 +6917,7 @@ func (x *BehindAheadRequest) String() string { func (*BehindAheadRequest) ProtoMessage() {} func (x *BehindAheadRequest) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[100] + mi := &file_gitserver_proto_msgTypes[102] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6821,7 +6930,7 @@ func (x *BehindAheadRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BehindAheadRequest.ProtoReflect.Descriptor instead. func (*BehindAheadRequest) Descriptor() ([]byte, []int) { - return file_gitserver_proto_rawDescGZIP(), []int{100} + return file_gitserver_proto_rawDescGZIP(), []int{102} } func (x *BehindAheadRequest) GetRepoName() string { @@ -6861,7 +6970,7 @@ type BehindAheadResponse struct { func (x *BehindAheadResponse) Reset() { *x = BehindAheadResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[101] + mi := &file_gitserver_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6874,7 +6983,7 @@ func (x *BehindAheadResponse) String() string { func (*BehindAheadResponse) ProtoMessage() {} func (x *BehindAheadResponse) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[101] + mi := &file_gitserver_proto_msgTypes[103] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6887,7 +6996,7 @@ func (x *BehindAheadResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BehindAheadResponse.ProtoReflect.Descriptor instead. func (*BehindAheadResponse) Descriptor() ([]byte, []int) { - return file_gitserver_proto_rawDescGZIP(), []int{101} + return file_gitserver_proto_rawDescGZIP(), []int{103} } func (x *BehindAheadResponse) GetBehind() uint32 { @@ -6923,7 +7032,7 @@ type ChangedFilesRequest struct { func (x *ChangedFilesRequest) Reset() { *x = ChangedFilesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[102] + mi := &file_gitserver_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6936,7 +7045,7 @@ func (x *ChangedFilesRequest) String() string { func (*ChangedFilesRequest) ProtoMessage() {} func (x *ChangedFilesRequest) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[102] + mi := &file_gitserver_proto_msgTypes[104] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6949,7 +7058,7 @@ func (x *ChangedFilesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangedFilesRequest.ProtoReflect.Descriptor instead. func (*ChangedFilesRequest) Descriptor() ([]byte, []int) { - return file_gitserver_proto_rawDescGZIP(), []int{102} + return file_gitserver_proto_rawDescGZIP(), []int{104} } func (x *ChangedFilesRequest) GetRepoName() string { @@ -6984,7 +7093,7 @@ type ChangedFilesResponse struct { func (x *ChangedFilesResponse) Reset() { *x = ChangedFilesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[103] + mi := &file_gitserver_proto_msgTypes[105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6997,7 +7106,7 @@ func (x *ChangedFilesResponse) String() string { func (*ChangedFilesResponse) ProtoMessage() {} func (x *ChangedFilesResponse) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[103] + mi := &file_gitserver_proto_msgTypes[105] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7010,7 +7119,7 @@ func (x *ChangedFilesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangedFilesResponse.ProtoReflect.Descriptor instead. func (*ChangedFilesResponse) Descriptor() ([]byte, []int) { - return file_gitserver_proto_rawDescGZIP(), []int{103} + return file_gitserver_proto_rawDescGZIP(), []int{105} } func (x *ChangedFilesResponse) GetFiles() []*ChangedFile { @@ -7033,7 +7142,7 @@ type ChangedFile struct { func (x *ChangedFile) Reset() { *x = ChangedFile{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[104] + mi := &file_gitserver_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7046,7 +7155,7 @@ func (x *ChangedFile) String() string { func (*ChangedFile) ProtoMessage() {} func (x *ChangedFile) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[104] + mi := &file_gitserver_proto_msgTypes[106] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7059,7 +7168,7 @@ func (x *ChangedFile) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangedFile.ProtoReflect.Descriptor instead. func (*ChangedFile) Descriptor() ([]byte, []int) { - return file_gitserver_proto_rawDescGZIP(), []int{104} + return file_gitserver_proto_rawDescGZIP(), []int{106} } func (x *ChangedFile) GetPath() []byte { @@ -7094,7 +7203,7 @@ type ListRepositoriesResponse_GitRepository struct { func (x *ListRepositoriesResponse_GitRepository) Reset() { *x = ListRepositoriesResponse_GitRepository{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[105] + mi := &file_gitserver_proto_msgTypes[107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7107,7 +7216,7 @@ func (x *ListRepositoriesResponse_GitRepository) String() string { func (*ListRepositoriesResponse_GitRepository) ProtoMessage() {} func (x *ListRepositoriesResponse_GitRepository) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[105] + mi := &file_gitserver_proto_msgTypes[107] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7162,7 +7271,7 @@ type CreateCommitFromPatchBinaryRequest_Metadata struct { func (x *CreateCommitFromPatchBinaryRequest_Metadata) Reset() { *x = CreateCommitFromPatchBinaryRequest_Metadata{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[106] + mi := &file_gitserver_proto_msgTypes[108] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7175,7 +7284,7 @@ func (x *CreateCommitFromPatchBinaryRequest_Metadata) String() string { func (*CreateCommitFromPatchBinaryRequest_Metadata) ProtoMessage() {} func (x *CreateCommitFromPatchBinaryRequest_Metadata) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[106] + mi := &file_gitserver_proto_msgTypes[108] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7252,7 +7361,7 @@ type CreateCommitFromPatchBinaryRequest_Patch struct { func (x *CreateCommitFromPatchBinaryRequest_Patch) Reset() { *x = CreateCommitFromPatchBinaryRequest_Patch{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[107] + mi := &file_gitserver_proto_msgTypes[109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7265,7 +7374,7 @@ func (x *CreateCommitFromPatchBinaryRequest_Patch) String() string { func (*CreateCommitFromPatchBinaryRequest_Patch) ProtoMessage() {} func (x *CreateCommitFromPatchBinaryRequest_Patch) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[107] + mi := &file_gitserver_proto_msgTypes[109] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7301,7 +7410,7 @@ type CommitMatch_Signature struct { func (x *CommitMatch_Signature) Reset() { *x = CommitMatch_Signature{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[108] + mi := &file_gitserver_proto_msgTypes[110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7314,7 +7423,7 @@ func (x *CommitMatch_Signature) String() string { func (*CommitMatch_Signature) ProtoMessage() {} func (x *CommitMatch_Signature) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[108] + mi := &file_gitserver_proto_msgTypes[110] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7363,7 +7472,7 @@ type CommitMatch_MatchedString struct { func (x *CommitMatch_MatchedString) Reset() { *x = CommitMatch_MatchedString{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[109] + mi := &file_gitserver_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7376,7 +7485,7 @@ func (x *CommitMatch_MatchedString) String() string { func (*CommitMatch_MatchedString) ProtoMessage() {} func (x *CommitMatch_MatchedString) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[109] + mi := &file_gitserver_proto_msgTypes[111] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7419,7 +7528,7 @@ type CommitMatch_Range struct { func (x *CommitMatch_Range) Reset() { *x = CommitMatch_Range{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[110] + mi := &file_gitserver_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7432,7 +7541,7 @@ func (x *CommitMatch_Range) String() string { func (*CommitMatch_Range) ProtoMessage() {} func (x *CommitMatch_Range) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[110] + mi := &file_gitserver_proto_msgTypes[112] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7475,7 +7584,7 @@ type CommitMatch_Location struct { func (x *CommitMatch_Location) Reset() { *x = CommitMatch_Location{} if protoimpl.UnsafeEnabled { - mi := &file_gitserver_proto_msgTypes[111] + mi := &file_gitserver_proto_msgTypes[113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7488,7 +7597,7 @@ func (x *CommitMatch_Location) String() string { func (*CommitMatch_Location) ProtoMessage() {} func (x *CommitMatch_Location) ProtoReflect() protoreflect.Message { - mi := &file_gitserver_proto_msgTypes[111] + mi := &file_gitserver_proto_msgTypes[113] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8379,282 +8488,299 @@ var file_gitserver_proto_rawDesc = []byte{ 0x31, 0x0a, 0x15, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, - 0x68, 0x61, 0x22, 0x35, 0x0a, 0x16, 0x46, 0x69, 0x72, 0x73, 0x74, 0x45, 0x76, 0x65, 0x72, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x72, 0x65, 0x70, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4a, 0x0a, 0x17, 0x46, 0x69, 0x72, - 0x73, 0x74, 0x45, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x06, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x5b, 0x0a, 0x12, 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x41, - 0x68, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, - 0x65, 0x70, 0x6f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x72, 0x65, 0x70, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x65, 0x66, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6c, 0x65, 0x66, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x72, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x69, 0x67, - 0x68, 0x74, 0x22, 0x43, 0x0a, 0x13, 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x41, 0x68, 0x65, 0x61, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x65, 0x68, - 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x62, 0x65, 0x68, 0x69, 0x6e, - 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x68, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x05, 0x61, 0x68, 0x65, 0x61, 0x64, 0x22, 0x68, 0x0a, 0x13, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x68, 0x61, 0x22, 0x52, 0x0a, 0x17, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x4f, + 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x76, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x65, + 0x76, 0x73, 0x70, 0x65, 0x63, 0x73, 0x22, 0x4d, 0x0a, 0x18, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, + 0x61, 0x73, 0x65, 0x4f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x12, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x53, 0x68, 0x61, 0x22, 0x35, 0x0a, 0x16, 0x46, 0x69, 0x72, 0x73, 0x74, 0x45, 0x76, + 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4a, 0x0a, 0x17, + 0x46, 0x69, 0x72, 0x73, 0x74, 0x45, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x5b, 0x0a, 0x12, 0x42, 0x65, 0x68, 0x69, + 0x6e, 0x64, 0x41, 0x68, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x62, - 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x62, 0x61, 0x73, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x04, 0x68, 0x65, 0x61, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x62, 0x61, 0x73, - 0x65, 0x22, 0x47, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x66, 0x69, 0x6c, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, - 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x0b, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x38, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, - 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x74, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x4c, 0x45, - 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x04, 0x2a, 0x71, - 0x0a, 0x0c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1d, - 0x0a, 0x19, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, - 0x11, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, - 0x4e, 0x44, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, - 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x4f, 0x50, - 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x10, - 0x03, 0x2a, 0x5f, 0x0a, 0x0d, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x5f, 0x46, 0x4f, - 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x5f, 0x46, 0x4f, - 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x5a, 0x49, 0x50, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x52, - 0x43, 0x48, 0x49, 0x56, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x54, 0x41, 0x52, - 0x10, 0x02, 0x32, 0xce, 0x02, 0x0a, 0x1a, 0x47, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x63, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, - 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x0f, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, + 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, + 0x65, 0x66, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6c, 0x65, 0x66, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, + 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x43, 0x0a, 0x13, 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x41, + 0x68, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x62, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x62, 0x65, + 0x68, 0x69, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x68, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x61, 0x68, 0x65, 0x61, 0x64, 0x22, 0x68, 0x0a, 0x13, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, + 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, + 0x62, 0x61, 0x73, 0x65, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x65, 0x61, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x62, 0x61, 0x73, 0x65, 0x22, 0x47, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x69, + 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0xd1, 0x01, + 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x74, 0x0a, 0x06, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, + 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, + 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, + 0x04, 0x2a, 0x71, 0x0a, 0x0c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4b, 0x69, 0x6e, + 0x64, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4b, 0x49, + 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x15, 0x0a, 0x11, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4b, 0x49, 0x4e, + 0x44, 0x5f, 0x41, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, + 0x54, 0x4f, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x15, 0x0a, + 0x11, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4e, + 0x4f, 0x54, 0x10, 0x03, 0x2a, 0x5f, 0x0a, 0x0d, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, + 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, + 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x5a, 0x49, 0x50, 0x10, 0x01, 0x12, 0x16, 0x0a, + 0x12, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, + 0x54, 0x41, 0x52, 0x10, 0x02, 0x32, 0xce, 0x02, 0x0a, 0x1a, 0x47, 0x69, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x02, 0x12, 0x66, 0x0a, 0x10, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x25, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, - 0x90, 0x02, 0x01, 0x32, 0xa2, 0x18, 0x0a, 0x10, 0x47, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x1b, 0x43, 0x72, 0x65, + 0x26, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x0f, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x67, + 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x02, 0x12, 0x66, + 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x32, 0x8a, 0x19, 0x0a, 0x10, 0x47, 0x69, 0x74, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x1b, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, + 0x50, 0x61, 0x74, 0x63, 0x68, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x30, 0x2e, 0x67, 0x69, + 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x74, 0x63, 0x68, + 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x74, - 0x63, 0x68, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x30, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x74, 0x63, 0x68, 0x42, 0x69, 0x6e, - 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x69, 0x74, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x74, 0x63, 0x68, 0x42, - 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x12, 0x4e, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, - 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, - 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, - 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, - 0x01, 0x12, 0x51, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, - 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, - 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x03, 0x90, 0x02, 0x01, 0x12, 0x63, 0x0a, 0x0f, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x43, 0x6c, - 0x6f, 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x43, 0x6c, 0x6f, - 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x52, - 0x65, 0x70, 0x6f, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x5a, 0x0a, 0x0c, 0x4c, 0x69, 0x73, - 0x74, 0x47, 0x69, 0x74, 0x6f, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x69, 0x74, - 0x6f, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, + 0x63, 0x68, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x28, 0x01, 0x12, 0x4e, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x69, 0x73, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x69, 0x73, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x03, 0x90, 0x02, 0x01, 0x12, 0x51, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x63, 0x0a, 0x0f, 0x49, 0x73, 0x52, 0x65, 0x70, + 0x6f, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, + 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x5a, 0x0a, 0x0c, + 0x4c, 0x69, 0x73, 0x74, 0x47, 0x69, 0x74, 0x6f, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x47, 0x69, 0x74, 0x6f, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x4a, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, - 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, - 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, - 0x01, 0x12, 0x4d, 0x0a, 0x07, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x1c, 0x2e, 0x67, - 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x63, 0x68, - 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x69, 0x74, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, - 0x12, 0x69, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x50, 0x72, 0x6f, - 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, - 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, - 0x6f, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x7b, 0x0a, 0x17, 0x49, - 0x73, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6c, 0x6f, - 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x50, 0x61, 0x74, 0x68, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x61, - 0x74, 0x68, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x7e, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x12, 0x2d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x5d, 0x0a, 0x0d, 0x50, 0x65, 0x72, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, - 0x66, 0x6f, 0x72, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x7b, 0x0a, 0x17, 0x50, 0x65, 0x72, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, - 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, - 0x74, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x73, - 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x03, 0x90, 0x02, 0x01, 0x12, 0x7e, 0x0a, 0x18, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x44, 0x65, 0x70, 0x6f, 0x74, - 0x12, 0x2d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x73, - 0x46, 0x6f, 0x72, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x73, 0x46, - 0x6f, 0x72, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x03, 0x90, 0x02, 0x01, 0x12, 0x72, 0x0a, 0x14, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x67, - 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x6f, 0x0a, 0x13, 0x49, 0x73, 0x50, 0x65, - 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, - 0x28, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, - 0x73, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x69, 0x74, 0x73, + 0x47, 0x69, 0x74, 0x6f, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x22, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x47, 0x69, 0x74, 0x6f, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x4a, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x12, 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, + 0x02, 0x01, 0x30, 0x01, 0x12, 0x4d, 0x0a, 0x07, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, + 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x63, + 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, + 0x01, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x43, 0x6c, 0x6f, 0x6e, 0x65, + 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x43, 0x6c, 0x6f, 0x6e, + 0x65, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x70, 0x6f, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x7b, + 0x0a, 0x17, 0x49, 0x73, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, + 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x50, 0x65, 0x72, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x75, 0x0a, 0x15, 0x50, 0x65, 0x72, - 0x66, 0x6f, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, - 0x73, 0x74, 0x12, 0x2a, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, - 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, - 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, - 0x12, 0x51, 0x0a, 0x09, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x12, 0x1e, 0x2e, - 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, - 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, - 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, - 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, - 0x90, 0x02, 0x01, 0x12, 0x47, 0x0a, 0x05, 0x42, 0x6c, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x2e, 0x67, - 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x61, 0x6d, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, 0x12, 0x5d, 0x0a, 0x0d, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x22, 0x2e, - 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x50, 0x0a, 0x08, 0x52, - 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, 0x12, 0x51, 0x0a, - 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x69, 0x74, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x69, 0x74, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, - 0x12, 0x63, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x03, 0x90, 0x02, 0x02, 0x12, 0x50, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, - 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, 0x12, 0x51, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x41, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x4d, 0x0a, 0x07, 0x52, 0x61, - 0x77, 0x44, 0x69, 0x66, 0x66, 0x12, 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x11, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x26, - 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, - 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x03, 0x90, 0x02, 0x01, 0x12, 0x63, 0x0a, 0x0f, 0x46, 0x69, 0x72, 0x73, 0x74, 0x45, 0x76, 0x65, - 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x72, 0x73, 0x74, 0x45, 0x76, 0x65, 0x72, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x72, - 0x73, 0x74, 0x45, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x57, 0x0a, 0x0b, 0x42, 0x65, 0x68, - 0x69, 0x6e, 0x64, 0x41, 0x68, 0x65, 0x61, 0x64, 0x12, 0x20, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x41, 0x68, - 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x69, 0x74, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, - 0x41, 0x68, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, - 0x02, 0x01, 0x12, 0x5c, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, - 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, - 0x12, 0x42, 0x0a, 0x04, 0x53, 0x74, 0x61, 0x74, 0x12, 0x19, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x03, 0x90, 0x02, 0x01, 0x12, 0x4d, 0x0a, 0x07, 0x52, 0x65, 0x61, 0x64, 0x44, 0x69, 0x72, 0x12, - 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x61, 0x64, 0x44, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, - 0x64, 0x44, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, - 0x01, 0x30, 0x01, 0x12, 0x53, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, + 0x72, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x7e, 0x0a, 0x18, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x2d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x5d, 0x0a, 0x0d, 0x50, + 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x67, + 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x7b, 0x0a, 0x17, 0x50, 0x65, + 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x73, 0x46, 0x6f, + 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x65, 0x63, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, + 0x63, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x7e, 0x0a, 0x18, 0x50, 0x65, 0x72, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x44, 0x65, + 0x70, 0x6f, 0x74, 0x12, 0x2d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, + 0x63, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, + 0x74, 0x73, 0x46, 0x6f, 0x72, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x72, 0x0a, 0x14, 0x50, 0x65, 0x72, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, + 0x29, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x69, 0x74, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x6f, 0x0a, 0x13, 0x49, + 0x73, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x28, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x73, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, + 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, + 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x50, 0x65, + 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x75, 0x0a, 0x15, + 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, + 0x90, 0x02, 0x01, 0x12, 0x51, 0x0a, 0x09, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x47, 0x0a, 0x05, 0x42, 0x6c, 0x61, 0x6d, 0x65, 0x12, + 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x6c, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x69, + 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x61, 0x6d, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, 0x12, + 0x5d, 0x0a, 0x0d, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x50, + 0x0a, 0x08, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x69, 0x74, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, + 0x12, 0x51, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1e, 0x2e, + 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, + 0x90, 0x02, 0x01, 0x12, 0x63, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, + 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x02, 0x12, 0x50, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x66, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, 0x12, 0x51, 0x0a, 0x09, 0x52, 0x65, + 0x76, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x4d, 0x0a, + 0x07, 0x52, 0x61, 0x77, 0x44, 0x69, 0x66, 0x66, 0x12, 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x44, 0x69, 0x66, 0x66, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x11, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x12, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x63, 0x0a, 0x0f, 0x46, 0x69, 0x72, 0x73, 0x74, + 0x45, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x72, 0x73, 0x74, 0x45, + 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x69, 0x72, 0x73, 0x74, 0x45, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x57, 0x0a, 0x0b, + 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x41, 0x68, 0x65, 0x61, 0x64, 0x12, 0x20, 0x2e, 0x67, 0x69, + 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x68, 0x69, 0x6e, + 0x64, 0x41, 0x68, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x68, + 0x69, 0x6e, 0x64, 0x41, 0x68, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x5c, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, + 0x01, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x04, 0x53, 0x74, 0x61, 0x74, 0x12, 0x19, 0x2e, 0x67, 0x69, + 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x4d, 0x0a, 0x07, 0x52, 0x65, 0x61, 0x64, 0x44, + 0x69, 0x72, 0x12, 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x44, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x61, 0x64, 0x44, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, 0x12, 0x53, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x4c, 0x6f, 0x67, 0x12, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x30, 0x01, 0x12, 0x66, 0x0a, 0x10, 0x4d, + 0x65, 0x72, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x4f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x12, + 0x25, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x72, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x4f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x4f, + 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, + 0x90, 0x02, 0x01, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x2f, 0x67, 0x69, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8670,7 +8796,7 @@ func file_gitserver_proto_rawDescGZIP() []byte { } var file_gitserver_proto_enumTypes = make([]protoimpl.EnumInfo, 8) -var file_gitserver_proto_msgTypes = make([]protoimpl.MessageInfo, 112) +var file_gitserver_proto_msgTypes = make([]protoimpl.MessageInfo, 114) var file_gitserver_proto_goTypes = []interface{}{ (OperatorKind)(0), // 0: gitserver.v1.OperatorKind (ArchiveFormat)(0), // 1: gitserver.v1.ArchiveFormat @@ -8778,57 +8904,59 @@ var file_gitserver_proto_goTypes = []interface{}{ (*PerforceUser)(nil), // 103: gitserver.v1.PerforceUser (*MergeBaseRequest)(nil), // 104: gitserver.v1.MergeBaseRequest (*MergeBaseResponse)(nil), // 105: gitserver.v1.MergeBaseResponse - (*FirstEverCommitRequest)(nil), // 106: gitserver.v1.FirstEverCommitRequest - (*FirstEverCommitResponse)(nil), // 107: gitserver.v1.FirstEverCommitResponse - (*BehindAheadRequest)(nil), // 108: gitserver.v1.BehindAheadRequest - (*BehindAheadResponse)(nil), // 109: gitserver.v1.BehindAheadResponse - (*ChangedFilesRequest)(nil), // 110: gitserver.v1.ChangedFilesRequest - (*ChangedFilesResponse)(nil), // 111: gitserver.v1.ChangedFilesResponse - (*ChangedFile)(nil), // 112: gitserver.v1.ChangedFile - (*ListRepositoriesResponse_GitRepository)(nil), // 113: gitserver.v1.ListRepositoriesResponse.GitRepository - (*CreateCommitFromPatchBinaryRequest_Metadata)(nil), // 114: gitserver.v1.CreateCommitFromPatchBinaryRequest.Metadata - (*CreateCommitFromPatchBinaryRequest_Patch)(nil), // 115: gitserver.v1.CreateCommitFromPatchBinaryRequest.Patch - (*CommitMatch_Signature)(nil), // 116: gitserver.v1.CommitMatch.Signature - (*CommitMatch_MatchedString)(nil), // 117: gitserver.v1.CommitMatch.MatchedString - (*CommitMatch_Range)(nil), // 118: gitserver.v1.CommitMatch.Range - (*CommitMatch_Location)(nil), // 119: gitserver.v1.CommitMatch.Location - (*timestamppb.Timestamp)(nil), // 120: google.protobuf.Timestamp + (*MergeBaseOctopusRequest)(nil), // 106: gitserver.v1.MergeBaseOctopusRequest + (*MergeBaseOctopusResponse)(nil), // 107: gitserver.v1.MergeBaseOctopusResponse + (*FirstEverCommitRequest)(nil), // 108: gitserver.v1.FirstEverCommitRequest + (*FirstEverCommitResponse)(nil), // 109: gitserver.v1.FirstEverCommitResponse + (*BehindAheadRequest)(nil), // 110: gitserver.v1.BehindAheadRequest + (*BehindAheadResponse)(nil), // 111: gitserver.v1.BehindAheadResponse + (*ChangedFilesRequest)(nil), // 112: gitserver.v1.ChangedFilesRequest + (*ChangedFilesResponse)(nil), // 113: gitserver.v1.ChangedFilesResponse + (*ChangedFile)(nil), // 114: gitserver.v1.ChangedFile + (*ListRepositoriesResponse_GitRepository)(nil), // 115: gitserver.v1.ListRepositoriesResponse.GitRepository + (*CreateCommitFromPatchBinaryRequest_Metadata)(nil), // 116: gitserver.v1.CreateCommitFromPatchBinaryRequest.Metadata + (*CreateCommitFromPatchBinaryRequest_Patch)(nil), // 117: gitserver.v1.CreateCommitFromPatchBinaryRequest.Patch + (*CommitMatch_Signature)(nil), // 118: gitserver.v1.CommitMatch.Signature + (*CommitMatch_MatchedString)(nil), // 119: gitserver.v1.CommitMatch.MatchedString + (*CommitMatch_Range)(nil), // 120: gitserver.v1.CommitMatch.Range + (*CommitMatch_Location)(nil), // 121: gitserver.v1.CommitMatch.Location + (*timestamppb.Timestamp)(nil), // 122: google.protobuf.Timestamp } var file_gitserver_proto_depIdxs = []int32{ - 113, // 0: gitserver.v1.ListRepositoriesResponse.repositories:type_name -> gitserver.v1.ListRepositoriesResponse.GitRepository - 120, // 1: gitserver.v1.FetchRepositoryResponse.last_fetched:type_name -> google.protobuf.Timestamp - 120, // 2: gitserver.v1.FetchRepositoryResponse.last_changed:type_name -> google.protobuf.Timestamp - 120, // 3: gitserver.v1.CommitLogRequest.after:type_name -> google.protobuf.Timestamp - 120, // 4: gitserver.v1.CommitLogRequest.before:type_name -> google.protobuf.Timestamp + 115, // 0: gitserver.v1.ListRepositoriesResponse.repositories:type_name -> gitserver.v1.ListRepositoriesResponse.GitRepository + 122, // 1: gitserver.v1.FetchRepositoryResponse.last_fetched:type_name -> google.protobuf.Timestamp + 122, // 2: gitserver.v1.FetchRepositoryResponse.last_changed:type_name -> google.protobuf.Timestamp + 122, // 3: gitserver.v1.CommitLogRequest.after:type_name -> google.protobuf.Timestamp + 122, // 4: gitserver.v1.CommitLogRequest.before:type_name -> google.protobuf.Timestamp 2, // 5: gitserver.v1.CommitLogRequest.order:type_name -> gitserver.v1.CommitLogRequest.CommitLogOrder 35, // 6: gitserver.v1.CommitLogResponse.commits:type_name -> gitserver.v1.GetCommitResponse - 120, // 7: gitserver.v1.ContributorCountsRequest.after:type_name -> google.protobuf.Timestamp + 122, // 7: gitserver.v1.ContributorCountsRequest.after:type_name -> google.protobuf.Timestamp 37, // 8: gitserver.v1.ContributorCount.author:type_name -> gitserver.v1.GitSignature 17, // 9: gitserver.v1.ContributorCountsResponse.counts:type_name -> gitserver.v1.ContributorCount 3, // 10: gitserver.v1.RawDiffRequest.comparison_type:type_name -> gitserver.v1.RawDiffRequest.ComparisonType 23, // 11: gitserver.v1.ListRefsResponse.refs:type_name -> gitserver.v1.GitRef - 120, // 12: gitserver.v1.GitRef.created_at:type_name -> google.protobuf.Timestamp + 122, // 12: gitserver.v1.GitRef.created_at:type_name -> google.protobuf.Timestamp 4, // 13: gitserver.v1.GitRef.ref_type:type_name -> gitserver.v1.GitRef.RefType 29, // 14: gitserver.v1.StatResponse.file_info:type_name -> gitserver.v1.FileInfo 29, // 15: gitserver.v1.ReadDirResponse.file_info:type_name -> gitserver.v1.FileInfo 28, // 16: gitserver.v1.FileInfo.submodule:type_name -> gitserver.v1.GitSubmodule - 120, // 17: gitserver.v1.RevAtTimeRequest.time:type_name -> google.protobuf.Timestamp + 122, // 17: gitserver.v1.RevAtTimeRequest.time:type_name -> google.protobuf.Timestamp 36, // 18: gitserver.v1.GetCommitResponse.commit:type_name -> gitserver.v1.GitCommit 37, // 19: gitserver.v1.GitCommit.author:type_name -> gitserver.v1.GitSignature 37, // 20: gitserver.v1.GitCommit.committer:type_name -> gitserver.v1.GitSignature - 120, // 21: gitserver.v1.GitSignature.date:type_name -> google.protobuf.Timestamp + 122, // 21: gitserver.v1.GitSignature.date:type_name -> google.protobuf.Timestamp 39, // 22: gitserver.v1.BlameRequest.range:type_name -> gitserver.v1.BlameRange 41, // 23: gitserver.v1.BlameResponse.hunk:type_name -> gitserver.v1.BlameHunk 42, // 24: gitserver.v1.BlameHunk.author:type_name -> gitserver.v1.BlameAuthor 43, // 25: gitserver.v1.BlameHunk.previous_commit:type_name -> gitserver.v1.PreviousCommit - 120, // 26: gitserver.v1.BlameAuthor.date:type_name -> google.protobuf.Timestamp - 120, // 27: gitserver.v1.PatchCommitInfo.date:type_name -> google.protobuf.Timestamp - 114, // 28: gitserver.v1.CreateCommitFromPatchBinaryRequest.metadata:type_name -> gitserver.v1.CreateCommitFromPatchBinaryRequest.Metadata - 115, // 29: gitserver.v1.CreateCommitFromPatchBinaryRequest.patch:type_name -> gitserver.v1.CreateCommitFromPatchBinaryRequest.Patch + 122, // 26: gitserver.v1.BlameAuthor.date:type_name -> google.protobuf.Timestamp + 122, // 27: gitserver.v1.PatchCommitInfo.date:type_name -> google.protobuf.Timestamp + 116, // 28: gitserver.v1.CreateCommitFromPatchBinaryRequest.metadata:type_name -> gitserver.v1.CreateCommitFromPatchBinaryRequest.Metadata + 117, // 29: gitserver.v1.CreateCommitFromPatchBinaryRequest.patch:type_name -> gitserver.v1.CreateCommitFromPatchBinaryRequest.Patch 59, // 30: gitserver.v1.SearchRequest.revisions:type_name -> gitserver.v1.RevisionSpecifier 69, // 31: gitserver.v1.SearchRequest.query:type_name -> gitserver.v1.QueryNode - 120, // 32: gitserver.v1.CommitBeforeNode.timestamp:type_name -> google.protobuf.Timestamp - 120, // 33: gitserver.v1.CommitAfterNode.timestamp:type_name -> google.protobuf.Timestamp + 122, // 32: gitserver.v1.CommitBeforeNode.timestamp:type_name -> google.protobuf.Timestamp + 122, // 33: gitserver.v1.CommitAfterNode.timestamp:type_name -> google.protobuf.Timestamp 0, // 34: gitserver.v1.OperatorNode.kind:type_name -> gitserver.v1.OperatorKind 69, // 35: gitserver.v1.OperatorNode.operands:type_name -> gitserver.v1.QueryNode 60, // 36: gitserver.v1.QueryNode.author_matches:type_name -> gitserver.v1.AuthorMatchesNode @@ -8841,10 +8969,10 @@ var file_gitserver_proto_depIdxs = []int32{ 67, // 43: gitserver.v1.QueryNode.boolean:type_name -> gitserver.v1.BooleanNode 68, // 44: gitserver.v1.QueryNode.operator:type_name -> gitserver.v1.OperatorNode 71, // 45: gitserver.v1.SearchResponse.match:type_name -> gitserver.v1.CommitMatch - 116, // 46: gitserver.v1.CommitMatch.author:type_name -> gitserver.v1.CommitMatch.Signature - 116, // 47: gitserver.v1.CommitMatch.committer:type_name -> gitserver.v1.CommitMatch.Signature - 117, // 48: gitserver.v1.CommitMatch.message:type_name -> gitserver.v1.CommitMatch.MatchedString - 117, // 49: gitserver.v1.CommitMatch.diff:type_name -> gitserver.v1.CommitMatch.MatchedString + 118, // 46: gitserver.v1.CommitMatch.author:type_name -> gitserver.v1.CommitMatch.Signature + 118, // 47: gitserver.v1.CommitMatch.committer:type_name -> gitserver.v1.CommitMatch.Signature + 119, // 48: gitserver.v1.CommitMatch.message:type_name -> gitserver.v1.CommitMatch.MatchedString + 119, // 49: gitserver.v1.CommitMatch.diff:type_name -> gitserver.v1.CommitMatch.MatchedString 1, // 50: gitserver.v1.ArchiveRequest.format:type_name -> gitserver.v1.ArchiveFormat 79, // 51: gitserver.v1.ListGitoliteResponse.repos:type_name -> gitserver.v1.GitoliteRepo 83, // 52: gitserver.v1.GetObjectResponse.object:type_name -> gitserver.v1.GitObject @@ -8853,7 +8981,7 @@ var file_gitserver_proto_depIdxs = []int32{ 88, // 55: gitserver.v1.CheckPerforceCredentialsRequest.connection_details:type_name -> gitserver.v1.PerforceConnectionDetails 88, // 56: gitserver.v1.PerforceGetChangelistRequest.connection_details:type_name -> gitserver.v1.PerforceConnectionDetails 91, // 57: gitserver.v1.PerforceGetChangelistResponse.changelist:type_name -> gitserver.v1.PerforceChangelist - 120, // 58: gitserver.v1.PerforceChangelist.creation_date:type_name -> google.protobuf.Timestamp + 122, // 58: gitserver.v1.PerforceChangelist.creation_date:type_name -> google.protobuf.Timestamp 6, // 59: gitserver.v1.PerforceChangelist.state:type_name -> gitserver.v1.PerforceChangelist.PerforceChangelistState 88, // 60: gitserver.v1.IsPerforceSuperUserRequest.connection_details:type_name -> gitserver.v1.PerforceConnectionDetails 88, // 61: gitserver.v1.PerforceProtectsForDepotRequest.connection_details:type_name -> gitserver.v1.PerforceConnectionDetails @@ -8864,14 +8992,14 @@ var file_gitserver_proto_depIdxs = []int32{ 88, // 66: gitserver.v1.PerforceUsersRequest.connection_details:type_name -> gitserver.v1.PerforceConnectionDetails 103, // 67: gitserver.v1.PerforceUsersResponse.users:type_name -> gitserver.v1.PerforceUser 36, // 68: gitserver.v1.FirstEverCommitResponse.commit:type_name -> gitserver.v1.GitCommit - 112, // 69: gitserver.v1.ChangedFilesResponse.files:type_name -> gitserver.v1.ChangedFile + 114, // 69: gitserver.v1.ChangedFilesResponse.files:type_name -> gitserver.v1.ChangedFile 7, // 70: gitserver.v1.ChangedFile.status:type_name -> gitserver.v1.ChangedFile.Status 50, // 71: gitserver.v1.CreateCommitFromPatchBinaryRequest.Metadata.commit_info:type_name -> gitserver.v1.PatchCommitInfo 51, // 72: gitserver.v1.CreateCommitFromPatchBinaryRequest.Metadata.push:type_name -> gitserver.v1.PushConfig - 120, // 73: gitserver.v1.CommitMatch.Signature.date:type_name -> google.protobuf.Timestamp - 118, // 74: gitserver.v1.CommitMatch.MatchedString.ranges:type_name -> gitserver.v1.CommitMatch.Range - 119, // 75: gitserver.v1.CommitMatch.Range.start:type_name -> gitserver.v1.CommitMatch.Location - 119, // 76: gitserver.v1.CommitMatch.Range.end:type_name -> gitserver.v1.CommitMatch.Location + 122, // 73: gitserver.v1.CommitMatch.Signature.date:type_name -> google.protobuf.Timestamp + 120, // 74: gitserver.v1.CommitMatch.MatchedString.ranges:type_name -> gitserver.v1.CommitMatch.Range + 121, // 75: gitserver.v1.CommitMatch.Range.start:type_name -> gitserver.v1.CommitMatch.Location + 121, // 76: gitserver.v1.CommitMatch.Range.end:type_name -> gitserver.v1.CommitMatch.Location 10, // 77: gitserver.v1.GitserverRepositoryService.DeleteRepository:input_type -> gitserver.v1.DeleteRepositoryRequest 12, // 78: gitserver.v1.GitserverRepositoryService.FetchRepository:input_type -> gitserver.v1.FetchRepositoryRequest 8, // 79: gitserver.v1.GitserverRepositoryService.ListRepositories:input_type -> gitserver.v1.ListRepositoriesRequest @@ -8901,49 +9029,51 @@ var file_gitserver_proto_depIdxs = []int32{ 32, // 103: gitserver.v1.GitserverService.RevAtTime:input_type -> gitserver.v1.RevAtTimeRequest 19, // 104: gitserver.v1.GitserverService.RawDiff:input_type -> gitserver.v1.RawDiffRequest 16, // 105: gitserver.v1.GitserverService.ContributorCounts:input_type -> gitserver.v1.ContributorCountsRequest - 106, // 106: gitserver.v1.GitserverService.FirstEverCommit:input_type -> gitserver.v1.FirstEverCommitRequest - 108, // 107: gitserver.v1.GitserverService.BehindAhead:input_type -> gitserver.v1.BehindAheadRequest - 110, // 108: gitserver.v1.GitserverService.ChangedFiles:input_type -> gitserver.v1.ChangedFilesRequest + 108, // 106: gitserver.v1.GitserverService.FirstEverCommit:input_type -> gitserver.v1.FirstEverCommitRequest + 110, // 107: gitserver.v1.GitserverService.BehindAhead:input_type -> gitserver.v1.BehindAheadRequest + 112, // 108: gitserver.v1.GitserverService.ChangedFiles:input_type -> gitserver.v1.ChangedFilesRequest 24, // 109: gitserver.v1.GitserverService.Stat:input_type -> gitserver.v1.StatRequest 26, // 110: gitserver.v1.GitserverService.ReadDir:input_type -> gitserver.v1.ReadDirRequest 14, // 111: gitserver.v1.GitserverService.CommitLog:input_type -> gitserver.v1.CommitLogRequest - 11, // 112: gitserver.v1.GitserverRepositoryService.DeleteRepository:output_type -> gitserver.v1.DeleteRepositoryResponse - 13, // 113: gitserver.v1.GitserverRepositoryService.FetchRepository:output_type -> gitserver.v1.FetchRepositoryResponse - 9, // 114: gitserver.v1.GitserverRepositoryService.ListRepositories:output_type -> gitserver.v1.ListRepositoriesResponse - 54, // 115: gitserver.v1.GitserverService.CreateCommitFromPatchBinary:output_type -> gitserver.v1.CreateCommitFromPatchBinaryResponse - 49, // 116: gitserver.v1.GitserverService.DiskInfo:output_type -> gitserver.v1.DiskInfoResponse - 82, // 117: gitserver.v1.GitserverService.GetObject:output_type -> gitserver.v1.GetObjectResponse - 75, // 118: gitserver.v1.GitserverService.IsRepoCloneable:output_type -> gitserver.v1.IsRepoCloneableResponse - 80, // 119: gitserver.v1.GitserverService.ListGitolite:output_type -> gitserver.v1.ListGitoliteResponse - 70, // 120: gitserver.v1.GitserverService.Search:output_type -> gitserver.v1.SearchResponse - 73, // 121: gitserver.v1.GitserverService.Archive:output_type -> gitserver.v1.ArchiveResponse - 77, // 122: gitserver.v1.GitserverService.RepoCloneProgress:output_type -> gitserver.v1.RepoCloneProgressResponse - 85, // 123: gitserver.v1.GitserverService.IsPerforcePathCloneable:output_type -> gitserver.v1.IsPerforcePathCloneableResponse - 87, // 124: gitserver.v1.GitserverService.CheckPerforceCredentials:output_type -> gitserver.v1.CheckPerforceCredentialsResponse - 102, // 125: gitserver.v1.GitserverService.PerforceUsers:output_type -> gitserver.v1.PerforceUsersResponse - 97, // 126: gitserver.v1.GitserverService.PerforceProtectsForUser:output_type -> gitserver.v1.PerforceProtectsForUserResponse - 95, // 127: gitserver.v1.GitserverService.PerforceProtectsForDepot:output_type -> gitserver.v1.PerforceProtectsForDepotResponse - 100, // 128: gitserver.v1.GitserverService.PerforceGroupMembers:output_type -> gitserver.v1.PerforceGroupMembersResponse - 93, // 129: gitserver.v1.GitserverService.IsPerforceSuperUser:output_type -> gitserver.v1.IsPerforceSuperUserResponse - 90, // 130: gitserver.v1.GitserverService.PerforceGetChangelist:output_type -> gitserver.v1.PerforceGetChangelistResponse - 105, // 131: gitserver.v1.GitserverService.MergeBase:output_type -> gitserver.v1.MergeBaseResponse - 40, // 132: gitserver.v1.GitserverService.Blame:output_type -> gitserver.v1.BlameResponse - 45, // 133: gitserver.v1.GitserverService.DefaultBranch:output_type -> gitserver.v1.DefaultBranchResponse - 47, // 134: gitserver.v1.GitserverService.ReadFile:output_type -> gitserver.v1.ReadFileResponse - 35, // 135: gitserver.v1.GitserverService.GetCommit:output_type -> gitserver.v1.GetCommitResponse - 31, // 136: gitserver.v1.GitserverService.ResolveRevision:output_type -> gitserver.v1.ResolveRevisionResponse - 22, // 137: gitserver.v1.GitserverService.ListRefs:output_type -> gitserver.v1.ListRefsResponse - 33, // 138: gitserver.v1.GitserverService.RevAtTime:output_type -> gitserver.v1.RevAtTimeResponse - 20, // 139: gitserver.v1.GitserverService.RawDiff:output_type -> gitserver.v1.RawDiffResponse - 18, // 140: gitserver.v1.GitserverService.ContributorCounts:output_type -> gitserver.v1.ContributorCountsResponse - 107, // 141: gitserver.v1.GitserverService.FirstEverCommit:output_type -> gitserver.v1.FirstEverCommitResponse - 109, // 142: gitserver.v1.GitserverService.BehindAhead:output_type -> gitserver.v1.BehindAheadResponse - 111, // 143: gitserver.v1.GitserverService.ChangedFiles:output_type -> gitserver.v1.ChangedFilesResponse - 25, // 144: gitserver.v1.GitserverService.Stat:output_type -> gitserver.v1.StatResponse - 27, // 145: gitserver.v1.GitserverService.ReadDir:output_type -> gitserver.v1.ReadDirResponse - 15, // 146: gitserver.v1.GitserverService.CommitLog:output_type -> gitserver.v1.CommitLogResponse - 112, // [112:147] is the sub-list for method output_type - 77, // [77:112] is the sub-list for method input_type + 106, // 112: gitserver.v1.GitserverService.MergeBaseOctopus:input_type -> gitserver.v1.MergeBaseOctopusRequest + 11, // 113: gitserver.v1.GitserverRepositoryService.DeleteRepository:output_type -> gitserver.v1.DeleteRepositoryResponse + 13, // 114: gitserver.v1.GitserverRepositoryService.FetchRepository:output_type -> gitserver.v1.FetchRepositoryResponse + 9, // 115: gitserver.v1.GitserverRepositoryService.ListRepositories:output_type -> gitserver.v1.ListRepositoriesResponse + 54, // 116: gitserver.v1.GitserverService.CreateCommitFromPatchBinary:output_type -> gitserver.v1.CreateCommitFromPatchBinaryResponse + 49, // 117: gitserver.v1.GitserverService.DiskInfo:output_type -> gitserver.v1.DiskInfoResponse + 82, // 118: gitserver.v1.GitserverService.GetObject:output_type -> gitserver.v1.GetObjectResponse + 75, // 119: gitserver.v1.GitserverService.IsRepoCloneable:output_type -> gitserver.v1.IsRepoCloneableResponse + 80, // 120: gitserver.v1.GitserverService.ListGitolite:output_type -> gitserver.v1.ListGitoliteResponse + 70, // 121: gitserver.v1.GitserverService.Search:output_type -> gitserver.v1.SearchResponse + 73, // 122: gitserver.v1.GitserverService.Archive:output_type -> gitserver.v1.ArchiveResponse + 77, // 123: gitserver.v1.GitserverService.RepoCloneProgress:output_type -> gitserver.v1.RepoCloneProgressResponse + 85, // 124: gitserver.v1.GitserverService.IsPerforcePathCloneable:output_type -> gitserver.v1.IsPerforcePathCloneableResponse + 87, // 125: gitserver.v1.GitserverService.CheckPerforceCredentials:output_type -> gitserver.v1.CheckPerforceCredentialsResponse + 102, // 126: gitserver.v1.GitserverService.PerforceUsers:output_type -> gitserver.v1.PerforceUsersResponse + 97, // 127: gitserver.v1.GitserverService.PerforceProtectsForUser:output_type -> gitserver.v1.PerforceProtectsForUserResponse + 95, // 128: gitserver.v1.GitserverService.PerforceProtectsForDepot:output_type -> gitserver.v1.PerforceProtectsForDepotResponse + 100, // 129: gitserver.v1.GitserverService.PerforceGroupMembers:output_type -> gitserver.v1.PerforceGroupMembersResponse + 93, // 130: gitserver.v1.GitserverService.IsPerforceSuperUser:output_type -> gitserver.v1.IsPerforceSuperUserResponse + 90, // 131: gitserver.v1.GitserverService.PerforceGetChangelist:output_type -> gitserver.v1.PerforceGetChangelistResponse + 105, // 132: gitserver.v1.GitserverService.MergeBase:output_type -> gitserver.v1.MergeBaseResponse + 40, // 133: gitserver.v1.GitserverService.Blame:output_type -> gitserver.v1.BlameResponse + 45, // 134: gitserver.v1.GitserverService.DefaultBranch:output_type -> gitserver.v1.DefaultBranchResponse + 47, // 135: gitserver.v1.GitserverService.ReadFile:output_type -> gitserver.v1.ReadFileResponse + 35, // 136: gitserver.v1.GitserverService.GetCommit:output_type -> gitserver.v1.GetCommitResponse + 31, // 137: gitserver.v1.GitserverService.ResolveRevision:output_type -> gitserver.v1.ResolveRevisionResponse + 22, // 138: gitserver.v1.GitserverService.ListRefs:output_type -> gitserver.v1.ListRefsResponse + 33, // 139: gitserver.v1.GitserverService.RevAtTime:output_type -> gitserver.v1.RevAtTimeResponse + 20, // 140: gitserver.v1.GitserverService.RawDiff:output_type -> gitserver.v1.RawDiffResponse + 18, // 141: gitserver.v1.GitserverService.ContributorCounts:output_type -> gitserver.v1.ContributorCountsResponse + 109, // 142: gitserver.v1.GitserverService.FirstEverCommit:output_type -> gitserver.v1.FirstEverCommitResponse + 111, // 143: gitserver.v1.GitserverService.BehindAhead:output_type -> gitserver.v1.BehindAheadResponse + 113, // 144: gitserver.v1.GitserverService.ChangedFiles:output_type -> gitserver.v1.ChangedFilesResponse + 25, // 145: gitserver.v1.GitserverService.Stat:output_type -> gitserver.v1.StatResponse + 27, // 146: gitserver.v1.GitserverService.ReadDir:output_type -> gitserver.v1.ReadDirResponse + 15, // 147: gitserver.v1.GitserverService.CommitLog:output_type -> gitserver.v1.CommitLogResponse + 107, // 148: gitserver.v1.GitserverService.MergeBaseOctopus:output_type -> gitserver.v1.MergeBaseOctopusResponse + 113, // [113:149] is the sub-list for method output_type + 77, // [77:113] is the sub-list for method input_type 77, // [77:77] is the sub-list for extension type_name 77, // [77:77] is the sub-list for extension extendee 0, // [0:77] is the sub-list for field type_name @@ -10132,7 +10262,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FirstEverCommitRequest); i { + switch v := v.(*MergeBaseOctopusRequest); i { case 0: return &v.state case 1: @@ -10144,7 +10274,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FirstEverCommitResponse); i { + switch v := v.(*MergeBaseOctopusResponse); i { case 0: return &v.state case 1: @@ -10156,7 +10286,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BehindAheadRequest); i { + switch v := v.(*FirstEverCommitRequest); i { case 0: return &v.state case 1: @@ -10168,7 +10298,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BehindAheadResponse); i { + switch v := v.(*FirstEverCommitResponse); i { case 0: return &v.state case 1: @@ -10180,7 +10310,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangedFilesRequest); i { + switch v := v.(*BehindAheadRequest); i { case 0: return &v.state case 1: @@ -10192,7 +10322,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangedFilesResponse); i { + switch v := v.(*BehindAheadResponse); i { case 0: return &v.state case 1: @@ -10204,7 +10334,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangedFile); i { + switch v := v.(*ChangedFilesRequest); i { case 0: return &v.state case 1: @@ -10216,7 +10346,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRepositoriesResponse_GitRepository); i { + switch v := v.(*ChangedFilesResponse); i { case 0: return &v.state case 1: @@ -10228,7 +10358,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateCommitFromPatchBinaryRequest_Metadata); i { + switch v := v.(*ChangedFile); i { case 0: return &v.state case 1: @@ -10240,7 +10370,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateCommitFromPatchBinaryRequest_Patch); i { + switch v := v.(*ListRepositoriesResponse_GitRepository); i { case 0: return &v.state case 1: @@ -10252,7 +10382,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommitMatch_Signature); i { + switch v := v.(*CreateCommitFromPatchBinaryRequest_Metadata); i { case 0: return &v.state case 1: @@ -10264,7 +10394,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommitMatch_MatchedString); i { + switch v := v.(*CreateCommitFromPatchBinaryRequest_Patch); i { case 0: return &v.state case 1: @@ -10276,7 +10406,7 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommitMatch_Range); i { + switch v := v.(*CommitMatch_Signature); i { case 0: return &v.state case 1: @@ -10288,6 +10418,30 @@ func file_gitserver_proto_init() { } } file_gitserver_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommitMatch_MatchedString); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitserver_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommitMatch_Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitserver_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommitMatch_Location); i { case 0: return &v.state @@ -10326,15 +10480,15 @@ func file_gitserver_proto_init() { (*SearchResponse_Match)(nil), (*SearchResponse_LimitHit)(nil), } - file_gitserver_proto_msgTypes[102].OneofWrappers = []interface{}{} - file_gitserver_proto_msgTypes[106].OneofWrappers = []interface{}{} + file_gitserver_proto_msgTypes[104].OneofWrappers = []interface{}{} + file_gitserver_proto_msgTypes[108].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gitserver_proto_rawDesc, NumEnums: 8, - NumMessages: 112, + NumMessages: 114, NumExtensions: 0, NumServices: 2, }, diff --git a/internal/gitserver/v1/gitserver.proto b/internal/gitserver/v1/gitserver.proto index a146ec41ac5..429ddcddace 100644 --- a/internal/gitserver/v1/gitserver.proto +++ b/internal/gitserver/v1/gitserver.proto @@ -344,6 +344,27 @@ service GitserverService { rpc CommitLog(CommitLogRequest) returns (stream CommitLogResponse) { option idempotency_level = NO_SIDE_EFFECTS; } + // MergeBaseOctopus returns the octopus merge base commit sha for the specified + // revspecs. + // If no common merge base exists, an empty string is returned. + // See the following diagrams from git-merge-base docs on what octopus merge bases + // are: + // Given three commits A, B, and C, MergeBaseOctopus(A, B, C) will compute the + // best common ancestor of all commits. + // For example, with this topology: + // o---o---o---o---C + // / + // / o---o---o---B + // / / + // ---2---1---o---o---o---A + // The result of MergeBaseOctopus(A, B, C) is 2, because 2 is the + // best common ancestor of all commits. + // + // If the given repo is not cloned, it will be enqueued for cloning and a + // NotFound error will be returned, with a RepoNotFoundPayload in the details. + rpc MergeBaseOctopus(MergeBaseOctopusRequest) returns (MergeBaseOctopusResponse) { + option idempotency_level = NO_SIDE_EFFECTS; + } } message CommitLogRequest { @@ -1265,6 +1286,22 @@ message MergeBaseResponse { string merge_base_commit_sha = 1; } +// MergeBaseOctopusRequest is a request to find the octopus merge base of revspecs. +message MergeBaseOctopusRequest { + // repo_name is the name of the repo to get the octopus merge base for. + // Note: We use field ID 2 here to reserve 1 for a future repo int32 field. + string repo_name = 2; + // revspecs are the revspecs to consider for merge-base. For now, we allow non-utf8 + // revspecs. + repeated bytes revspecs = 3; +} + +// MergeBaseOctopusResponse is the response from finding the octopus merge base of +// the given revspecs. +message MergeBaseOctopusResponse { + string merge_base_commit_sha = 1; +} + // FirstEverCommitRequest is a request to get the first ever commit in a repo. message FirstEverCommitRequest { // repo_name is the name of the repo to get the first ever commit for. diff --git a/internal/gitserver/v1/gitserver_grpc.pb.go b/internal/gitserver/v1/gitserver_grpc.pb.go index 8d0d744e847..32d3773f398 100644 --- a/internal/gitserver/v1/gitserver_grpc.pb.go +++ b/internal/gitserver/v1/gitserver_grpc.pb.go @@ -226,6 +226,7 @@ const ( GitserverService_Stat_FullMethodName = "/gitserver.v1.GitserverService/Stat" GitserverService_ReadDir_FullMethodName = "/gitserver.v1.GitserverService/ReadDir" GitserverService_CommitLog_FullMethodName = "/gitserver.v1.GitserverService/CommitLog" + GitserverService_MergeBaseOctopus_FullMethodName = "/gitserver.v1.GitserverService/MergeBaseOctopus" ) // GitserverServiceClient is the client API for GitserverService service. @@ -439,6 +440,36 @@ type GitserverServiceClient interface { // If one of the given ranges doesn't exist, an error with a ReversionNotFoundPayload // is returned. CommitLog(ctx context.Context, in *CommitLogRequest, opts ...grpc.CallOption) (GitserverService_CommitLogClient, error) + // MergeBaseOctopus returns the octopus merge base commit sha for the specified + // revspecs. + // If no common merge base exists, an empty string is returned. + // See the following diagrams from git-merge-base docs on what octopus merge bases + // are: + // Given three commits A, B, and C, git merge-base A B C will compute the merge base between A and a hypothetical commit M, which is a merge between B and C. For example, with this topology: + // + // o---o---o---o---C + // / + // + // / o---o---o---B + // / / + // ---2---1---o---o---o---A + // + // the result of git merge-base A B C is 1. This is because the equivalent topology with a merge commit M between B and C is: + // + // o---o---o---o---o + // / \ + // + // / o---o---o---o---M + // / / + // ---2---1---o---o---o---A + // + // and the result of git merge-base A M is 1. Commit 2 is also a common ancestor between A and M, but 1 is a better common ancestor, because 2 is an ancestor of 1. Hence, 2 is not a merge base. + // + // The result of git merge-base --octopus A B C is 2, because 2 is the best common ancestor of all commits. + // + // If the given repo is not cloned, it will be enqueued for cloning and a + // NotFound error will be returned, with a RepoNotFoundPayload in the details. + MergeBaseOctopus(ctx context.Context, in *MergeBaseOctopusRequest, opts ...grpc.CallOption) (*MergeBaseOctopusResponse, error) } type gitserverServiceClient struct { @@ -969,6 +1000,15 @@ func (x *gitserverServiceCommitLogClient) Recv() (*CommitLogResponse, error) { return m, nil } +func (c *gitserverServiceClient) MergeBaseOctopus(ctx context.Context, in *MergeBaseOctopusRequest, opts ...grpc.CallOption) (*MergeBaseOctopusResponse, error) { + out := new(MergeBaseOctopusResponse) + err := c.cc.Invoke(ctx, GitserverService_MergeBaseOctopus_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // GitserverServiceServer is the server API for GitserverService service. // All implementations must embed UnimplementedGitserverServiceServer // for forward compatibility @@ -1180,6 +1220,36 @@ type GitserverServiceServer interface { // If one of the given ranges doesn't exist, an error with a ReversionNotFoundPayload // is returned. CommitLog(*CommitLogRequest, GitserverService_CommitLogServer) error + // MergeBaseOctopus returns the octopus merge base commit sha for the specified + // revspecs. + // If no common merge base exists, an empty string is returned. + // See the following diagrams from git-merge-base docs on what octopus merge bases + // are: + // Given three commits A, B, and C, git merge-base A B C will compute the merge base between A and a hypothetical commit M, which is a merge between B and C. For example, with this topology: + // + // o---o---o---o---C + // / + // + // / o---o---o---B + // / / + // ---2---1---o---o---o---A + // + // the result of git merge-base A B C is 1. This is because the equivalent topology with a merge commit M between B and C is: + // + // o---o---o---o---o + // / \ + // + // / o---o---o---o---M + // / / + // ---2---1---o---o---o---A + // + // and the result of git merge-base A M is 1. Commit 2 is also a common ancestor between A and M, but 1 is a better common ancestor, because 2 is an ancestor of 1. Hence, 2 is not a merge base. + // + // The result of git merge-base --octopus A B C is 2, because 2 is the best common ancestor of all commits. + // + // If the given repo is not cloned, it will be enqueued for cloning and a + // NotFound error will be returned, with a RepoNotFoundPayload in the details. + MergeBaseOctopus(context.Context, *MergeBaseOctopusRequest) (*MergeBaseOctopusResponse, error) mustEmbedUnimplementedGitserverServiceServer() } @@ -1283,6 +1353,9 @@ func (UnimplementedGitserverServiceServer) ReadDir(*ReadDirRequest, GitserverSer func (UnimplementedGitserverServiceServer) CommitLog(*CommitLogRequest, GitserverService_CommitLogServer) error { return status.Errorf(codes.Unimplemented, "method CommitLog not implemented") } +func (UnimplementedGitserverServiceServer) MergeBaseOctopus(context.Context, *MergeBaseOctopusRequest) (*MergeBaseOctopusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MergeBaseOctopus not implemented") +} func (UnimplementedGitserverServiceServer) mustEmbedUnimplementedGitserverServiceServer() {} // UnsafeGitserverServiceServer may be embedded to opt out of forward compatibility for this service. @@ -1907,6 +1980,24 @@ func (x *gitserverServiceCommitLogServer) Send(m *CommitLogResponse) error { return x.ServerStream.SendMsg(m) } +func _GitserverService_MergeBaseOctopus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MergeBaseOctopusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitserverServiceServer).MergeBaseOctopus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GitserverService_MergeBaseOctopus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitserverServiceServer).MergeBaseOctopus(ctx, req.(*MergeBaseOctopusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // GitserverService_ServiceDesc is the grpc.ServiceDesc for GitserverService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -2002,6 +2093,10 @@ var GitserverService_ServiceDesc = grpc.ServiceDesc{ MethodName: "Stat", Handler: _GitserverService_Stat_Handler, }, + { + MethodName: "MergeBaseOctopus", + Handler: _GitserverService_MergeBaseOctopus_Handler, + }, }, Streams: []grpc.StreamDesc{ {