From bb5381aef78c21747a03b465cb6f55bf705898a1 Mon Sep 17 00:00:00 2001 From: Justin Tobler Date: Thu, 19 Oct 2023 11:43:31 -0500 Subject: proto: Add documentation for `ConflictsService` Some of the protobuf message types in the `ConflictsService` lack documentation. Add the missing documentation. --- proto/conflicts.proto | 26 +++++++++++++++----------- proto/go/gitalypb/conflicts.pb.go | 26 +++++++++++++++----------- 2 files changed, 30 insertions(+), 22 deletions(-) (limited to 'proto') diff --git a/proto/conflicts.proto b/proto/conflicts.proto index f615e95af..83e4905aa 100644 --- a/proto/conflicts.proto +++ b/proto/conflicts.proto @@ -49,34 +49,38 @@ message ListConflictFilesRequest { bool skip_content = 5; } -// ConflictFileHeader ... +// ConflictFileHeader contains parsed conflicted file information from the `git-merge-tree(1)` +// output for an individual file. message ConflictFileHeader { reserved 1; - // commit_oid ... + // commit_oid is the tree-ish revision being merged into. string commit_oid = 2; - // their_path ... + // their_path is the path of the conflicted file being merged from. bytes their_path = 3; - // our_path ... + // our_path is the path of the conflicted file being merged into. bytes our_path = 4; - // our_mode ... + // our_mode is the mode of the conflicted file being merged into. int32 our_mode = 5; - // ancestor_path ... + // ancestor_path is path of the conflicted file for the merge base. bytes ancestor_path = 6; } -// ConflictFile ... +// ConflictFile contains conflicted file information. message ConflictFile { oneof conflict_file_payload { - // header ... + // header contains the header information about a conflicted file. ConflictFileHeader header = 1; - // content ... + // content is the content data from the conflicted file. The file data may be broken into chunks + // and sent in the stream following a file header. if skip_content is set in the request, + // conflicted file content is not streamed. bytes content = 2; } } -// ListConflictFilesResponse ... +// ListConflictFilesResponse is the response for the ListConflicts RPC. message ListConflictFilesResponse { - // files ... + // files is a list of conflicted file information being sent in the stream. This information + // contains conflicted file headers and optionally the conflicted file content. repeated ConflictFile files = 1; } diff --git a/proto/go/gitalypb/conflicts.pb.go b/proto/go/gitalypb/conflicts.pb.go index 142d738f7..b075b8d8b 100644 --- a/proto/go/gitalypb/conflicts.pb.go +++ b/proto/go/gitalypb/conflicts.pb.go @@ -110,21 +110,22 @@ func (x *ListConflictFilesRequest) GetSkipContent() bool { return false } -// ConflictFileHeader ... +// ConflictFileHeader contains parsed conflicted file information from the `git-merge-tree(1)` +// output for an individual file. type ConflictFileHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // commit_oid ... + // commit_oid is the tree-ish revision being merged into. CommitOid string `protobuf:"bytes,2,opt,name=commit_oid,json=commitOid,proto3" json:"commit_oid,omitempty"` - // their_path ... + // their_path is the path of the conflicted file being merged from. TheirPath []byte `protobuf:"bytes,3,opt,name=their_path,json=theirPath,proto3" json:"their_path,omitempty"` - // our_path ... + // our_path is the path of the conflicted file being merged into. OurPath []byte `protobuf:"bytes,4,opt,name=our_path,json=ourPath,proto3" json:"our_path,omitempty"` - // our_mode ... + // our_mode is the mode of the conflicted file being merged into. OurMode int32 `protobuf:"varint,5,opt,name=our_mode,json=ourMode,proto3" json:"our_mode,omitempty"` - // ancestor_path ... + // ancestor_path is path of the conflicted file for the merge base. AncestorPath []byte `protobuf:"bytes,6,opt,name=ancestor_path,json=ancestorPath,proto3" json:"ancestor_path,omitempty"` } @@ -195,7 +196,7 @@ func (x *ConflictFileHeader) GetAncestorPath() []byte { return nil } -// ConflictFile ... +// ConflictFile contains conflicted file information. type ConflictFile struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -266,12 +267,14 @@ type isConflictFile_ConflictFilePayload interface { } type ConflictFile_Header struct { - // header ... + // header contains the header information about a conflicted file. Header *ConflictFileHeader `protobuf:"bytes,1,opt,name=header,proto3,oneof"` } type ConflictFile_Content struct { - // content ... + // content is the content data from the conflicted file. The file data may be broken into chunks + // and sent in the stream following a file header. if skip_content is set in the request, + // conflicted file content is not streamed. Content []byte `protobuf:"bytes,2,opt,name=content,proto3,oneof"` } @@ -279,13 +282,14 @@ func (*ConflictFile_Header) isConflictFile_ConflictFilePayload() {} func (*ConflictFile_Content) isConflictFile_ConflictFilePayload() {} -// ListConflictFilesResponse ... +// ListConflictFilesResponse is the response for the ListConflicts RPC. type ListConflictFilesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // files ... + // files is a list of conflicted file information being sent in the stream. This information + // contains conflicted file headers and optionally the conflicted file content. Files []*ConflictFile `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` } -- cgit v1.2.3