Protocol Documentation

Table of Contents

analysis.proto

Top

CheckBlobsGeneratedRequest

CheckBlobsGeneratedRequest is a request for the CheckBlobsGenerated RPC. The client may send

multiple requests through the stream to check multiple sets of files. The first request must have

the repository field set. Every request, including the first, must contain a blob set with at

least a single entry.

FieldTypeLabelDescription
repository Repository

repository is the repository that generated files are being checked for.

blobs CheckBlobsGeneratedRequest.Blob repeated

blobs is a set of blobs that the generated file check is being performed on.

CheckBlobsGeneratedRequest.Blob

Blob defines the required information to determine if a blob is generated.

FieldTypeLabelDescription
revision bytes

revision is a Git revision that resolves to a blob.

path bytes

path is the file path of the blob and is used to gain insight as to whether the blob is generated.

CheckBlobsGeneratedResponse

CheckBlobsGeneratedResponse is a response for the CheckBlobsGenerated RPC. If the client sends

multiple requests, the server responds with a separate response message for each request.

FieldTypeLabelDescription
blobs CheckBlobsGeneratedResponse.Blob repeated

blobs is a set of blobs that the generated file check has been performed on.

CheckBlobsGeneratedResponse.Blob

Blob defines the status of the generated blob check for a revision.

FieldTypeLabelDescription
revision bytes

revision is the Git revision of the checked blob provided in the request.

generated bool

generated is the result of the file generation check for a particular blob.

AnalysisService

AnalysisService is a gRPC service providing RPCs that analyze objects in a repository.

Method NameRequest TypeResponse TypeDescription
CheckBlobsGenerated CheckBlobsGeneratedRequest stream CheckBlobsGeneratedResponse stream

CheckBlobsGenerated checks a provided set of blobs in a specified repository to determine whether the file is considered generated. This RPC supports bidirectional streaming because the client may specify any number of files to check across multiple request messages and the server responds to each request with a separate set of response messages. Each provided blob in the request is validated when received. Improperly formatted requests result in RPC termination and an error being returned to the client. The RPC also aborts and returns an error if requests are made that list Git revisions which do not resolve to a blob and/or cannot be found in the repository.

blob.proto

Top

GetBlobRequest

GetBlobRequest is a request for the GetBlob RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository that shall be searched.

oid string

oid is the object ID of the blob we want to get.

limit int64

limit is the maximum number of bytes we want to receive. Use '-1' to get the full blob no matter how big. Setting this to `0` will return no data.

GetBlobResponse

GetBlobResponse is a response for the GetBlob RPC. Multiple responses will be returned when the blob is large and

thus doesn't fit into a single response.

FieldTypeLabelDescription
size int64

size is the size of the blob. Present only in first response message.

data bytes

data is a chunk of data.

oid string

oid of the actual blob returned. Empty if no blob was found.

GetBlobsRequest

GetBlobsRequest is a request for the GetBlobs RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository that shall be searched.

revision_paths GetBlobsRequest.RevisionPath repeated

revision_paths identifies the set of revision/path pairs that shall be searched for blobs.

limit int64

limit is the maximum number of bytes we want to receive. Use '-1' to get the full blobs no matter how big.

GetBlobsRequest.RevisionPath

RevisionPath is a combination of revision and path. All objects reachable in the subdirectory of the treeish

will be returned.

FieldTypeLabelDescription
revision string

revision is the revision that identifies the tree-ish. Must not be empty.

path bytes

path is the path relative to the treeish revision that shall be searched for a blob. If the path is empty the root directory of the tree-ish will be searched.

GetBlobsResponse

GetBlobsResponse is a response for the GetBlobs RPC and identifies a single blob. Multiple responses can be returned

for the same blob in case its data is longer than the gRPC message limit. Subsequent messages for the same blob will

only have their data field set. Blobs which cannot be found will only have their path and revision set, but will

otherwise be empty.

FieldTypeLabelDescription
size int64

size is the size of the blob. Present only on the first message per blob

data bytes

data is a chunk of blob data, which could span over multiple messages.

oid string

oid is the object ID of the current blob. Only present on the first message per blob. Empty if no blob was found.

is_submodule bool

is_submodule indicates whether the blob is a submodule.

mode int32

mode is the file mode of blob as present in the tree. It is typically one of: - 0o100644 for non-executable files. - 0o100755 for executable files. - 0o160000 for submodules. - 0o040000 for subtrees.

revision string

revision is the revision that this blob has been traversed from.

path bytes

path is the path of the blob inside of the tree.

type ObjectType

type is the type of the "blob".

GetLFSPointersRequest

GetLFSPointersRequest is a request for the GetLFSPointers RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository for which LFS pointers should be retrieved from.

blob_ids string repeated

blob_ids is the list of blobs to retrieve LFS pointers from. Must be a non-empty list of blobs IDs to fetch.

GetLFSPointersResponse

GetLFSPointersResponse is a response for the GetLFSPointers RPC.

FieldTypeLabelDescription
lfs_pointers LFSPointer repeated

lfs_pointers is the list of LFS pointers which were requested.

LFSPointer

LFSPointer is a git blob which points to an LFS object.

FieldTypeLabelDescription
size int64

size is the size of the blob. This is not the size of the LFS object pointed to.

data bytes

data is the bare data of the LFS pointer blob. It contains the pointer to the LFS data in the format specified by the LFS project.

oid string

oid is the object ID of the blob.

file_size int64

file_size is the size given when parsing the LFS pointer spec.

file_oid bytes

file_oid is the object id given when parsing the LFS pointer spec.

ListAllBlobsRequest

ListAllBlobsRequest is a request for the ListAllBlobs RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which blobs should be enumerated.

limit uint32

limit is the maximum number of blobs to return. If set to its default (`0`), then all found blobs will be returned.

bytes_limit int64

bytes_limit is the maximum number of bytes to receive for each blob. If set to `0`, then no blob data will be sent. If `-1`, then all blob data will be sent without any limits.

ListAllBlobsResponse

ListAllBlobsResponse is a response for the ListAllBlobs RPC.

FieldTypeLabelDescription
blobs ListAllBlobsResponse.Blob repeated

blobs is the blobs which have been found. In case blob contents were requested and contents of a blob exceed the maximum gRPC message size, then this blob will be split up into multiple blob messages which span across multiple responses. In that case, metadata of the blob will only be sent on the first such message for this specific blob.

ListAllBlobsResponse.Blob

Blob represents a Git blob object.

FieldTypeLabelDescription
oid string

oid is the object ID of the blob. Will only be set for the first message of each specific blob.

size int64

size is the size of the blob. Will only be set for the first message of each specific blob.

data bytes

data is the contents of the blob. This field is optional and depends on the BytesLimit in the original request.

ListAllLFSPointersRequest

ListAllLFSPointersRequest is a request for the ListAllLFSPointers RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository for which LFS pointers should be retrieved from.

limit int32

limit limits the number of LFS pointers returned.

ListAllLFSPointersResponse

ListAllLFSPointersResponse is a response for the ListAllLFSPointers RPC.

FieldTypeLabelDescription
lfs_pointers LFSPointer repeated

lfs_pointers is the list of LFS pointers which were requested.

ListBlobsRequest

ListBlobsRequest is a request for the ListBlobs RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which blobs should be enumerated.

revisions string repeated

revisions is the list of revisions to retrieve blobs from. These revisions will be walked. Supports pseudo-revisions `--all` and `--not` as well as negated revisions via `^revision`. Revisions cannot start with a leading dash. Please consult gitrevisions(7) for more info. Must not be empty.

limit uint32

limit is the maximum number of blobs to return. If set to its default (`0`), then all found blobs will be returned.

bytes_limit int64

bytes_limit is the maximum number of bytes to receive for each blob. If set to `0`, then no blob data will be sent. If `-1`, then all blob data will be sent without any limits.

with_paths bool

with_paths determines whether paths of blobs should be returned. When set to `true`, paths are returned on a best-effort basis: a path will only exist if the blob was traversed via a tree.

ListBlobsResponse

ListBlobsResponse is a response for the ListBlobs RPC.

FieldTypeLabelDescription
blobs ListBlobsResponse.Blob repeated

blobs is the blobs which have been found. In case blob contents were requested and contents of a blob exceed the maximum gRPC message size, then this blob will be split up into multiple blob messages which span across multiple responses. In that case, metadata of the blob will only be sent on the first such message for this specific blob.

ListBlobsResponse.Blob

Blob represents a Git blob object.

FieldTypeLabelDescription
oid string

oid is the object ID of the blob. Will only be set for the first message of each specific blob.

size int64

size is the size of the blob. Will only be set for the first message of each specific blob.

data bytes

data is the contents of the blob. This field is optional and depends on the BytesLimit in the original request.

path bytes

path is the path of the blob. May be unset depending on how the blob had been traversed.

ListLFSPointersRequest

ListLFSPointersRequest is a request for the ListLFSPointers RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository for which LFS pointers should be retrieved from.

revisions string repeated

revisions is the list of revisions to retrieve LFS pointers from. Must be a non-empty list.

limit int32

limit limits the number of LFS pointers returned.

ListLFSPointersResponse

ListLFSPointersResponse is a response for the ListLFSPointers RPC.

FieldTypeLabelDescription
lfs_pointers LFSPointer repeated

lfs_pointers is the list of LFS pointers which were requested.

BlobService

BlobService is a service which provides RPCs to retrieve Git blobs from a

specific repository.

Method NameRequest TypeResponse TypeDescription
GetBlob GetBlobRequest GetBlobResponse stream

GetBlob returns the contents of a blob object referenced by its object ID. We use a stream to return a chunked arbitrarily large binary response

GetBlobs GetBlobsRequest GetBlobsResponse stream

GetBlobs returns blobs identified via a revision and path. Note that the behaviour of this RPC is quite weird: it does not only return blobs, but will also return submodules as commits and trees. It's use is thus discouraged in favor of ListBlobs, which behaves more sanely.

ListBlobs ListBlobsRequest ListBlobsResponse stream

ListBlobs will list all blobs reachable from a given set of revisions by doing a graph walk. It is not valid to pass revisions which do not resolve to an existing object.

ListAllBlobs ListAllBlobsRequest ListAllBlobsResponse stream

ListAllBlobs retrieves all blobs pointers in the repository, including those not reachable by any reference.

GetLFSPointers GetLFSPointersRequest GetLFSPointersResponse stream

GetLFSPointers retrieves LFS pointers from a given set of object IDs. This RPC filters all requested objects and only returns those which refer to a valid LFS pointer.

ListLFSPointers ListLFSPointersRequest ListLFSPointersResponse stream

ListLFSPointers retrieves LFS pointers reachable from a given set of revisions by doing a graph walk. This includes both normal revisions like an object ID or branch, but also the pseudo-revisions "--all" and "--not" as documented in git-rev-parse(1). Revisions which don't directly or transitively reference any LFS pointers are ignored. It is not valid to pass revisions which do not resolve to an existing object.

ListAllLFSPointers ListAllLFSPointersRequest ListAllLFSPointersResponse stream

ListAllLFSPointers retrieves all LFS pointers in the repository, including those not reachable by any reference.

cleanup.proto

Top

ApplyBfgObjectMapStreamRequest

ApplyBfgObjectMapStreamRequest ...

FieldTypeLabelDescription
repository Repository

repository ... Only available on the first message

object_map bytes

object_map is a raw object-map file as generated by BFG: https://rtyley.github.io/bfg-repo-cleaner Each line in the file has two object SHAs, space-separated - the original SHA of the object, and the SHA after BFG has rewritten the object.

ApplyBfgObjectMapStreamResponse

ApplyBfgObjectMapStreamResponse ...

FieldTypeLabelDescription
entries ApplyBfgObjectMapStreamResponse.Entry repeated

entries ...

ApplyBfgObjectMapStreamResponse.Entry

Entry refers to each parsed entry in the request's object map so the client

can take action.

FieldTypeLabelDescription
type ObjectType

type ...

old_oid string

old_oid ...

new_oid string

new_oid ...

RewriteHistoryRequest

RewriteHistoryRequest is a request for the RewriteHistory RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository that shall be rewritten. Must be sent on the first request only.

blobs string repeated

blobs is the list of blob object ids that will be removed from history.

redactions bytes repeated

redactions is the list of literals or patterns that will be replaced with "***REMOVED***". Items cannot contain newline characters. See https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html for a full explanation of what patterns are supported.

RewriteHistoryResponse

RewriteHistoryResponse a response for the RewriteHistory RPC.

CleanupService

CleanupService provides RPCs to clean up a repository's contents.

Method NameRequest TypeResponse TypeDescription
ApplyBfgObjectMapStream ApplyBfgObjectMapStreamRequest stream ApplyBfgObjectMapStreamResponse stream

ApplyBfgObjectMapStream ...

RewriteHistory RewriteHistoryRequest stream RewriteHistoryResponse

RewriteHistory redacts targeted strings and deletes requested blobs in a repository and updates all references to point to the rewritten commit history. This is useful for removing inadvertently pushed secrets from your repository and purging large blobs. This is a dangerous operation. The following known error conditions may happen: - `InvalidArgument` in the following situations: - The provided repository can't be validated. - The repository field is set on any request other than the initial one. - All of the client requests do not contain either blobs to remove or redaction patterns to redact. - A blob object ID is invalid. - A redaction pattern contains a newline character. - `Aborted` if the repository is mutated while this RPC is executing.

cluster.proto

Top

PartitionKey

PartitionKey identifies which partition this replica belongs to.

FieldTypeLabelDescription
authority_name string

authority_name represents the storage that created the partition.

partition_id uint64

partition_id is the local incrementing ID of a specific partition within a storage. Together with `authority_name`, this forms a unique identifier for a partition across the cluster. A partition belongs to a Raft group.

RaftEntry

RaftEntry encapsulates critical data for replication using etcd/raft library.

It has a request ID allowing the primary to track when the action is

effectively applied.

FieldTypeLabelDescription
id uint64

id is the unique identifier for the Raft message. This ID is generated by an in-memory event registry. Raft uses this ID to track the commit status of a log entry.

data RaftEntry.LogData

data represents packed and serialized log data.

RaftEntry.LogData

LogData contains serialized log data, including the log entry itself

and all attached files in the log entry's directory. These data are

exchanged at the Transport layer before sending and after receiving

messages. They remain transparent to the core Raft engine.

FieldTypeLabelDescription
local_path bytes

local_path is the path to the staging log entry directory. Before the request is sent to other nodes, this whole directory of the entry is serialized. So, this field is only relevant to the primary node who issues the request.

packed bytes

packed is the serialized form of the log entry data. Transport implementations populates this field before sending out messages to other members of a Raft group.

RaftMessageRequest

RaftMessageRequest is a request for the SendMessage RPC. It serves as a

wrapper for raftpb.Message. etcd/raft's state machines on each member emit

this message. Since Gitaly employs multi-raft, routing metadata is attached

to ensure the message reaches the correct Raft group inside the receiving

Gitaly server.

FieldTypeLabelDescription
cluster_id string

cluster_id is the identifier of the Raft cluster to which this message belongs.

replica_id ReplicaID

replica_id uniquely identifies a replica in the Raft cluster.

message raftpb.Message

message is the Raft message to be delivered.

RaftMessageResponse

RaftMessageResponse represents a response to the SendMessage RPC.

RaftSnapshotMessageRequest

RaftSnapshotMessageRequest is the input to SendSnapshot RPC.

FieldTypeLabelDescription
raft_msg RaftMessageRequest

raft_msg is a wrapper for raftpb.Message

chunk bytes

chunk of snapshot data

RaftSnapshotMessageResponse

RaftSnapshotMessageResponse is the response to SendSnapshot RPC.

FieldTypeLabelDescription
destination string

destination is where the snapshot is saved.

snapshot_size uint64

snapshot_size is the snapshot size in bytes.

ReplicaID

ReplicaID uniquely identifies a replica in the Raft cluster.

It combines partition information with node-specific details.

FieldTypeLabelDescription
partition_key PartitionKey

partition_key identifies which partition this replica belongs to.

member_id uint64

member_id is the unique identifier assigned by etcd/raft.

storage_name string

storage_name is the name of the storage where this replica is hosted.

metadata ReplicaID.Metadata

metadata contains replica information.

type ReplicaID.ReplicaType

type indicates whether the replica is learner or voter.

ReplicaID.Metadata

Metadata contains routing information for the replica.

FieldTypeLabelDescription
address string

address is the network address of the replica.

ReplicaID.ReplicaType

ReplicaType indicates whether a replica is a voter or learner in the Raft cluster

NameNumberDescription
REPLICA_TYPE_UNSPECIFIED 0

REPLICA_TYPE_UNSPECIFIED.

REPLICA_TYPE_VOTER 1

REPLICA_TYPE_VOTER indicates a replica that can participate in Raft elections and voting.

REPLICA_TYPE_LEARNER 2

REPLICA_TYPE_LEARNER indicates a replica that receives updates but cannot vote.

RaftService

RaftService manages the sending of Raft messages to peers.

Method NameRequest TypeResponse TypeDescription
SendMessage RaftMessageRequest stream RaftMessageResponse

SendMessage processes Raft messages and ensures they are handled by the receiving node to update its Raft state machine.

SendSnapshot RaftSnapshotMessageRequest stream RaftSnapshotMessageResponse

SendSnapshot sends raft snapshots from the leader to the follower node. Typically it would be useful for nodes to catch up to the latest state.

commit.proto

Top

CheckObjectsExistRequest

CheckObjectsExistRequest is a request for the CheckObjectsExist RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which existence of objects and refs are checked. Only the initial request must contain a repository, the repository of all subsequent requests will be ignored.

revisions bytes repeated

revisions contains the revisions that shall be checked for existence. This accepts all revisions as documented in gitrevisions(7).

CheckObjectsExistResponse

CheckObjectsExistResponse is a response for the CheckObjectsExist RPC.

FieldTypeLabelDescription
revisions CheckObjectsExistResponse.RevisionExistence repeated

revisions is the list of RevisionExistence objects used to indicate which revisions exist.

CheckObjectsExistResponse.RevisionExistence

RevisionExistence lists a revision with information about its existence.

FieldTypeLabelDescription
name bytes

name refers to the revision.

exists bool

exists is true if the revision exists in the repository.

CommitIsAncestorRequest

CommitIsAncestorRequest is the request for the CommitIsAncestor RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository for which we need to check the ancestry.

ancestor_id string

ancestor_id is the object ID of the commit which needs to be checked as ancestor.

child_id string

child_id is the object ID of the commit whose ancestor needs to be confirmed.

CommitIsAncestorResponse

CommitIsAncestorResponse is the response for the CommitIsAncestor RPC.

FieldTypeLabelDescription
value bool

value denotes whether the provided commit is the ancestor or not.

CommitLanguagesRequest

CommitLanguagesRequest requests to detect the source code languages.

FieldTypeLabelDescription
repository Repository

repository is the repository where to detect the languages in.

revision bytes

revision tells for which commitish the languages should be detected. If it's omitted, the HEAD commit of the default branch is used.

CommitLanguagesResponse

CommitLanguagesResponse returns the language statistics.

FieldTypeLabelDescription
languages CommitLanguagesResponse.Language repeated

languages is a set of all the detected languages and their statistics.

CommitLanguagesResponse.Language

Language specifies the statistics for one language.

FieldTypeLabelDescription
name string

name is the name of the detected language, for example: Ruby, Go, HTML A full list of language names can be found at: https://github.com/github/linguist/blob/master/lib/linguist/languages.yml

share float

share is the percentual share (value between 0 and 100) of this language in relation to other languages that exist in the given revision.

color string

color specifies the associated color for this language, for example #3fd5e0.

bytes uint64

bytes is the total amount of bytes written in this language

CommitStatsRequest

CommitStatsRequest is the request for the CommitStats RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which the commit is present.

revision bytes

revision is a commitish for which we want to get the stats.

CommitStatsResponse

CommitStatsResponse is the request for the CommitStats RPC.

FieldTypeLabelDescription
oid string

oid is the commit object ID. It is empty if the commit is not found.

additions int32

additions refers to the number of lines added in the commit.

deletions int32

deletions refers to the number of lines deleted in the commit.

files int32

files refers to the number of files changed in the commit.

CommitsByMessageRequest

CommitsByMessageRequest is the request for the CommitsByMessage RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to run the query in.

revision bytes

revision is the commitish to retrieve commits against.

offset int32

offset is the offset from which to list commits.

limit int32

limit is the maximum number of commits to list.

path bytes

path is the relative path to filter the commits to.

query string

query is the search param to search commit messages against.

global_options GlobalOptions

global_options contains the global options used to modify the behaviour of Git.

CommitsByMessageResponse

CommitsByMessageResponse is the response for the CommitsByMessage RPC.

One 'page' of the paginated response of CommitsByMessage.

FieldTypeLabelDescription
commits GitCommit repeated

commits is the list of commits which match the query from the request.

CountCommitsRequest

CountCommitsRequest is the request for the CountCommits RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which we want to count the number of commits.

revision bytes

revision is a commitish which is the start point for the traversal of commits.

after google.protobuf.Timestamp

after is used to filter commits more recent than a specific date.

before google.protobuf.Timestamp

before is used to filter commits older than a specific date.

path bytes

path is used to filter commits which modify the provided path.

max_count int32

max_count is used to cap the number of commits.

all bool

all is used to consider all refs (including HEAD) as the start point for the traversal. all and Revision options are mutually exclusive.

first_parent bool

first_parent ensures that only the first parent commit is followed in the traversal.

global_options GlobalOptions

global_options contains the global options used to modify the behaviour of Git.

CountCommitsResponse

CountCommitsResponse is the response for the CountCommits RPC.

FieldTypeLabelDescription
count int32

count denotes the number of commits found as per the given filters.

CountDivergingCommitsRequest

CountDivergingCommitsRequest is the request for the CountDivergingCommits RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which we want to find the number of diverging commits.

from bytes

from is the object ID of one of the commits against which we want to check the number of diverging commits. The From and To fields are interchangeable.

to bytes

to is the object ID of one of the commits against which we want to check the number of diverging commits. The To and From fields are interchangeable.

max_count int32

max_count denotes the cap for the number of diverging commits to be reported.

CountDivergingCommitsResponse

CountDivergingCommitsResponse is the response for the CountDivergingCommits RPC.

FieldTypeLabelDescription
left_count int32

left_count denotes the number of diverging commits present in the 'From' commit provided.

right_count int32

right_count denotes the number of diverging commits present in the 'To' commit provided.

FilterShasWithSignaturesRequest

FilterShasWithSignaturesRequest is the request for the FilterShasWithSignatures RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to retrieve the commits from.

shas bytes repeated

shas is a set of commitish object IDs. If there is no corresponding commit for a provided sha, no error will be thrown. Only signed commits will be returned in the response.

FilterShasWithSignaturesResponse

FilterShasWithSignaturesResponse is the response for the FilterShasWithSignatures RPC.

FieldTypeLabelDescription
shas bytes repeated

shas is the filtered list of shas from the request which have an associated signed commit.

FindAllCommitsRequest

FindAllCommitsRequest is the request for the FindAllCommits RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository from which we will list the commits.

revision bytes

revision is the commitish which is the starting point for the traversal. When nil, return all commits reachable by any branch in the repo.

max_count int32

max_count is the maximum number of commits to list.

skip int32

skip is the number of commits to skip before starting to show the commit output.

order FindAllCommitsRequest.Order

order is the order in which commits should be traversed. Refer to the enum's documentation for further information.

FindAllCommitsResponse

FindAllCommitsResponse is the response for the FindAllCommits RPC. The response will be

chunked into multiple message if the returned data exceeds gRPC message limits.

FieldTypeLabelDescription
commits GitCommit repeated

commits is a list of commits produced as per the request.

FindCommitRequest

FindCommitRequest is the request for the FindCommit RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which we want to find the commit.

revision bytes

revision is a commitish which is to be resolved to a commit.

trailers bool

trailers if set, parses and adds the trailing information of the commit.

FindCommitResponse

FindCommitResponse is the request for the FindCommit RPC. Returns empty response

if the commit is not found.

FieldTypeLabelDescription
commit GitCommit

commit is the requested commit, it is nil when the commit was not found.

FindCommitsError

FindCommitsError is an error returned by the FindCommits RPC when no commit is found.

FieldTypeLabelDescription
bad_object BadObjectError

bad_object is returned when the revision cannot be found in the git repository.

ambiguous_ref AmbiguousReferenceError

ambiguous_ref is returned when the given revision cannot be found.

invalid_range InvalidRevisionRange

invalid_range is returned when the provided revision-range cannot be found in the git repository.

FindCommitsRequest

FindCommitsRequest is the request for the FindCommits RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository from which the commits are listed.

revision bytes

revision is a commitish against which the commits for the provided paths are listed. If there is no revision provided, the default branch is considered. It is mutually exclusive with the `All` option.

limit int32

limit is maximum number of commits to list.

offset int32

offset is the number of commits to skip before starting the traversal.

paths bytes repeated

paths is a list of non-empty paths for which we want to list commits.

follow bool

follow is used to list the history of a file beyond renames (works only for a single file).

skip_merges bool

skip_merges is used to skip merge commits.

disable_walk bool

Deprecated. disable_walk is no longer supported.

after google.protobuf.Timestamp

after will only list commits which are more recent than the specified date.

before google.protobuf.Timestamp

before will only list commits which are older than the specified date.

all bool

all is used to consider all refs (including HEAD) as the start point for the traversal. `all` and `revision` options are mutually exclusive.

first_parent bool

first_parent ensures that only the first parent commit is followed in the traversal.

author bytes

author will only list commits whose author matches the given pattern, which is a regular expression.

order FindCommitsRequest.Order

order is the order in which commits should be traversed. Please refer to the enum's documentation for further information.

global_options GlobalOptions

global_options contains the global options used to modify the behaviour of Git.

trailers bool

trailers if set, parses and adds the trailing information of the commit.

include_shortstat bool

include_shortstat determines whether to include the number of lines and files changed in the commits. Populates the `ShortStats` field.

include_referenced_by bytes repeated

include_referenced_by determines whether to include references that point to a commit in the response. The field contains patterns that are matched against references. Only matching references are included in the response. For example, one can get tags pointing to a commit with `refs/tags`, or branches respectively with `refs/heads`. By sending both, the response will include all references that match either pattern. protolint:disable:this REPEATED_FIELD_NAMES_PLURALIZED

message_regex string

message_regex is used to select only commits with messages matching the provided pattern. The pattern is a case-insensitive basic Posix regular expression.

Fields with deprecated option

Name Option
disable_walk

true

FindCommitsResponse

FindCommitsResponse is the response for the FindCommits RPC. The response will be

chunked into multiple message if the returned data exceeds gRPC message limits.

FieldTypeLabelDescription
commits GitCommit repeated

commits is a list of commits produced as per the request.

GetCommitMessagesRequest

GetCommitMessagesRequest is the request for the GetCommitMessages RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to retrieve the commits from.

commit_ids string repeated

commit_ids is the list of commitish object IDs for whom we want to retrieve the commit message.

GetCommitMessagesResponse

GetCommitMessagesResponse is the response for the GetCommitMessages RPC.

FieldTypeLabelDescription
commit_id string

commit_id is the commit object ID. A response with commit_id set, will be followed with response with the message field set with the commit message for that commit.

message bytes

message is the commit message for the commit.

GetCommitSignaturesRequest

GetCommitSignaturesRequest is the request for the GetCommitSignatures RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to retrieve the commits from.

commit_ids string repeated

commit_ids is the list of commitish object IDs for whom we want to retrieve signature information. If a commit doesn't have associated signature information it will be omitted from the results.

GetCommitSignaturesResponse

GetCommitSignaturesResponse is the response for the GetCommitSignatures RPC.

FieldTypeLabelDescription
commit_id string

commit_id of the signature.

signature bytes

signature of the commit (GPG or SSH).

signed_text bytes

signed_text is text that is used to verify the signature.

signer GetCommitSignaturesResponse.Signer

signer of the commit

author CommitAuthor

author provides the original commit author information without 'mailmap'.

GetTreeEntriesError

GetTreeEntriesError may be returned when GetTreeEntries fails with a specific root

cause.

FieldTypeLabelDescription
resolve_tree ResolveRevisionError

resolve_tree is set when the provided revision ID could not be resolved.

path PathError

path is set when the provided path is not valid.

GetTreeEntriesRequest

GetTreeEntriesRequest is the request for the GetTreeEntries RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to get the tree entries from.

revision bytes

revision is the commitish at which the tree entries is to be read.

path bytes

path is the path of the entry that shall be read, relative to the tree of the specified revision.

recursive bool

recursive denotes wether to recursively fetch sub-trees.

sort GetTreeEntriesRequest.SortBy

sort defines the sorting parameter.

pagination_params PaginationParameter

pagination_params controls paging. Refer to PaginationParameter documentation for further info.

skip_flat_paths bool

skip_flat_paths is an option to skip the expensive operation of populating flat paths.

GetTreeEntriesResponse

GetTreeEntriesResponse is the response for the GetTreeEntries RPC. The response will be

chunked into multiple message if the returned data exceeds gRPC message limits.

FieldTypeLabelDescription
entries TreeEntry repeated

entries denotes a list of tree entries.

pagination_cursor PaginationCursor

pagination_cursor defines the offset for subsequent requests. Refer to PaginationCursor documentation for further info.

LastCommitForPathRequest

LastCommitForPathRequest is a request for the LastCommitForPath RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to run the query in.

revision bytes

revision is the commitish that is used as the start commit to perform the search.

path bytes

path is the path for which the last commit should be searched. This path can either point to a blob or to a tree. The path must be relative and must not escape the repository root. If the path is empty or "/", then the repository root will be searched instead.

literal_pathspec bool

literal_pathspec will treat the path literally. No globbing or pathspec magic is performed. This option is deprecated in favor of GlobalOptions.

global_options GlobalOptions

global_options contains the global options used to modify the behaviour of Git.

LastCommitForPathResponse

LastCommitForPathResponse is a response for the LastCommitForPath RPC.

FieldTypeLabelDescription
commit GitCommit

commit is the commit that has last modified the given path. Unset in case the path could not be found.

ListAllCommitsRequest

ListAllCommitsRequest is a request for the ListAllCommits RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which commits should be searched for.

pagination_params PaginationParameter

pagination_params controls paging. Refer to PaginationParameter documentation for further info.

ListAllCommitsResponse

ListAllCommitsResponse is a response for the ListAllCommits RPC. The response will be

chunked into multiple message if the returned data exceeds gRPC message limits.

FieldTypeLabelDescription
commits GitCommit repeated

commits is the list of commits found.

ListCommitsByOidRequest

ListCommitsByOidRequest is the request for the ListCommitsByOid RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to list commits from.

oid string repeated

oid is a set of commitish object IDs to list commits for. If there is no commit against a provided object ID, no error is thrown. It is simply ignored. protolint:disable:this REPEATED_FIELD_NAMES_PLURALIZED

ListCommitsByOidResponse

ListCommitsByOidResponse is the response for the ListCommitsByOid RPC.

FieldTypeLabelDescription
commits GitCommit repeated

commits are the list of commits for the provided object IDs from the request.

ListCommitsByRefNameRequest

ListCommitsByRefNameRequest is the request for the ListCommitsByRefName RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to list commits from.

ref_names bytes repeated

ref_names is a set of references to obtain commits for. If there is no commit against a provided reference, no error is thrown. It is simply ignored.

ListCommitsByRefNameResponse

ListCommitsByRefNameResponse is the response for the ListCommitsByRefName RPC.

FieldTypeLabelDescription
commit_refs ListCommitsByRefNameResponse.CommitForRef repeated

commit_refs is a list of CommitForRef objects which provides the commits against the requested references.

ListCommitsByRefNameResponse.CommitForRef

CommitForRef holds the commit for a given reference.

FieldTypeLabelDescription
commit GitCommit

commit is the commit object against the reference.

ref_name bytes

ref_name is a reference from the repository.

ListCommitsRequest

ListCommitsRequest is a request for the ListCommits RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which commits should be searched for.

revisions string repeated

revisions is the set of revisions which should be walked to enumerate commits. Accepts all notation as documented in gitrevisions(7) as well as the pseudo-revisions `--not` and `--all` as documented in git-rev-list(1). Must not be empty.

pagination_params PaginationParameter

pagination_params controls paging. Refer to PaginationParameter documentation for further info.

order ListCommitsRequest.Order

order is the order in which commits should be traversed. Please refer to the enum's documentation for further information.

reverse bool

reverse will cause all commits to be listed in reverse.

max_parents uint32

max_parents will skip all commits which have more than the specified number of parents. If set to `0`, no filtering by parents will happen. If set to `1`, all merge commits will be omitted.

disable_walk bool

disable_walk will disable walking the graph. As a result, only commits which are immediately referenced by Revisions will be returned.

first_parent bool

first_parent will cause the graph walk to only go down the first-parent chain of commits. Merge commits will thus only cause the mainline to be enumerated.

after google.protobuf.Timestamp

after will only list commits which are more recent than the specified date.

before google.protobuf.Timestamp

before will only list commits which are older than the specified date.

author bytes

author will only list commits whose author matches the given pattern, which is a regular expression.

ignore_case bool

ignore_case will apply case-sensitive behaviour while regex matching.

commit_message_patterns bytes repeated

commit_message_patterns will only list commits whose commit message matches any of the given patterns.

skip uint32

skip will skip a number commits before starting to show the commit output.

ListCommitsResponse

ListCommitsResponse is a response for the ListCommits RPC. The response will be

chunked into multiple message if the returned data exceeds gRPC message limits.

FieldTypeLabelDescription
commits GitCommit repeated

commits is the list of commits found.

ListFilesRequest

ListFilesRequest is the request for the ListFiles RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to list the files from.

revision bytes

revision is a commitish against which we list all files.

ListFilesResponse

ListFilesResponse is the response for the ListFiles RPC. The response will be

chunked into multiple message if the returned data exceeds gRPC message limits.

FieldTypeLabelDescription
paths bytes repeated

paths is the list of paths found for the requested revision. Clients must remember to force utf-8 encoding.

ListLastCommitsForTreeRequest

ListLastCommitsForTreeRequest is the request for the ListLastCommitsForTree RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to run the query in.

revision string

revision is the treeish to retrieve commits against.

path bytes

path is the relative path to further filter against the treeish revision. This path can either point to a blob or to a tree. The path must be relative and must not escape the repository root. If the path is empty or "/", then it will be replaced with the root of of the repository.

limit int32

limit is the number of tree entries to limit the response to.

offset int32

offset is the offset of the tree entries from which to start the response.

literal_pathspec bool

Deprecated. literal_pathspec is deprecated.

global_options GlobalOptions

global_options contains the global options used to modify the behaviour of Git.

Fields with deprecated option

Name Option
literal_pathspec

true

ListLastCommitsForTreeResponse

ListLastCommitsForTreeResponse is the response for the ListLastCommitsForTree RPC.

FieldTypeLabelDescription
commits ListLastCommitsForTreeResponse.CommitForTree repeated

commits is a set of CommitForTree objects.

ListLastCommitsForTreeResponse.CommitForTree

CommitForTree denotes the last commit for associated path.

FieldTypeLabelDescription
commit GitCommit

commit is the commit that has last modified the path.

path_bytes bytes

path_bytes is the path associated with the commit.

RawBlameError

RawBlameError is used as error detail when the RawBlame RPC fails in a specific way.

FieldTypeLabelDescription
path_not_found PathNotFoundError

path_not_found is returned when the blamed path cannot be found in the revision.

out_of_range RawBlameError.OutOfRangeError

out_of_range is returned when the specified blamed range exceeds the file length.

resolve_ignore_revs RawBlameError.ResolveIgnoreRevsError

resolve_ignore_revs indicates that resolving the specified file containing ignored revisions has failed.

invalid_ignore_revs_format RawBlameError.InvalidIgnoreRevsFormatError

invalid_ignore_revs_format indicates that the specified file containing ignored revisions has an invalid format.

RawBlameError.InvalidIgnoreRevsFormatError

InvalidIgnoreRevsFormatError indicates that the file containing ignored

revisions has an invalid format.

FieldTypeLabelDescription
content bytes

content is the content of the line that is invalid. May be truncated.

RawBlameError.OutOfRangeError

OutOfRangeError indicates that the specified file range that is to be blamed exceeds the length of the blamed

file.

FieldTypeLabelDescription
actual_lines uint64

actual_lines contains the actual number of lines that can be blamed in the file.

RawBlameError.ResolveIgnoreRevsError

ResolveIgnoreRevsError indicates that a file could not be found for the provided revision

FieldTypeLabelDescription
ignore_revisions_blob bytes

ignore_revisions_blob is provided revision that does not refer to a blob

RawBlameRequest

RawBlameRequest is a request for the RawBlame RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to perform the blame on.

revision bytes

revision is the commitish at which to start the blame.

path bytes

path is the path of the blob that should be blamed.

range bytes

range is the comma-separated range of line numbers to perform the blame on, e.g. "1,1000". Optional - if no range is provided, the whole file will be blamed.

ignore_revisions_blob bytes

ignore_revisions_blob contains a revision like `refs/heads/master:.git-ignore-revs-file` that resolves to a blob. If set, the file will be used as input to git-blame(1) to ignore certain commits during blame. Please refer to the git-blame(1), more specifically the `--ignore-revs-file` parameter, for more information. If unset, no commits will be ignored. If set, it must resolve to a valid blob or otherwise the RPC call will fail.

RawBlameResponse

RawBlameResponse is a response for the RawBlame RPC. The response will be

chunked into multiple message if the returned data exceeds gRPC message limits.

FieldTypeLabelDescription
data bytes

data is the raw data as generated by git-blame(1).

TreeEntry

TreeEntry denotes a single tree entry.

FieldTypeLabelDescription
oid string

oid of the object this tree entry points to.

path bytes

path is the path of the entry relative to the tree of the specified revision.

type TreeEntry.EntryType

type denotes the type of the tree entry.

mode int32

mode is the mode of the tree entry.

commit_oid string

commit_oid is the commit object via which this entry was retrieved.

flat_path bytes

flat_path is the relative path of the first subdir that doesn't have only one directory descendant.

TreeEntryRequest

TreeEntryRequest is a request for the TreeEntry RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository for which to read the tree entry.

revision bytes

revision is the commitish at which the tree entry is to be read.

path bytes

path is the path of the entry that shall be read, relative to the tree of the specified revision.

limit int64

limit is the maximum number of bytes to fetch. If object is bigger, remaining bytes are not sent 0 means there is no limit.

max_size int64

max_size is the maximum allowed object size. If bigger, a FailedPrecondition error is returned 0 means there is no maximum size.

TreeEntryResponse

TreeEntryResponse is a response for the TreeEntry RPC. The response will be

chunked into multiple message if the returned data exceeds gRPC message limits.

FieldTypeLabelDescription
type TreeEntryResponse.ObjectType

type is the object type of the tree entry.

oid string

oid is the object ID of the tree entry. In case of submodules, it contains the commit ID that the submodule currently refers to.

size int64

size is the size of the tree entry.

mode int32

mode is the mode of the tree entry.

data bytes

data contains the raw object contents. This data may be split up across multiple messages.

FindAllCommitsRequest.Order

Order is the order in which commits should be traversed.

NameNumberDescription
NONE 0

NONE denotes the default ordering where the commits are shown in reverse chronological order. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

TOPO 1

TOPO order will cause no parents to be shown before all of its children are shown. Furthermore, multiple lines of history will not be intermixed. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

DATE 2

DATE order will cause no parents to be shown before all of its children are shown. Otherwise, commits are shown in commit timestamp order. This can cause history to be shown intermixed. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

FindCommitsRequest.Order

Order is the order in which commits should be traversed.

NameNumberDescription
NONE 0

NONE defaults to reverse chronological order. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

TOPO 1

TOPO order will cause no parents to be shown before all of its children are shown. Furthermore, multiple lines of history will not be intermixed. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

GetCommitSignaturesResponse.Signer

Signer of the commit. A commit can be signed either by a user or by Gitaly itself.

NameNumberDescription
SIGNER_UNSPECIFIED 0

SIGNER_UNSPECIFIED indicates that the signer has not been specified.

SIGNER_USER 1

SIGNER_USER indicates that the commit has been signed by a user.

SIGNER_SYSTEM 2

SIGNER_SYSTEM indicates that the commit has been signed by Gitaly itself.

GetTreeEntriesRequest.SortBy

SortBy provides the sorting parameters.

NameNumberDescription
DEFAULT 0

DEFAULT preserves the order of git ls-tree. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

TREES_FIRST 1

TREES_FIRST sorts the entries by trees, blobs and submodules. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

ListCommitsRequest.Order

Order is the order in which commits should be traversed.

NameNumberDescription
NONE 0

NONE defaults to reverse chronological order. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

TOPO 1

TOPO order will cause no parents to be shown before all of its children are shown. Furthermore, multiple lines of history will not be intermixed. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

DATE 2

DATE order will cause no parents to be shown before all of its children are shown. Otherwise, commits are shown in commit timestamp order. This can cause history to be shown intermixed. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

TreeEntry.EntryType

EntryType denotes the different types of tree entry.

NameNumberDescription
BLOB 0

BLOB indicates that the tree entry is a blob. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

TREE 1

TREE indicates that the tree entry is a tree, which may be the case for subdirectories. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

COMMIT 3

COMMIT indicates that the tree entry is a commit, which may be the case for submodules. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

TreeEntryResponse.ObjectType

ObjectType is the type of the returned tree entry.

TODO: Replace this enum with ObjectType in shared.proto

NameNumberDescription
COMMIT 0

COMMIT indicates that the tree entry is a commit, which may be the case for submodules. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

BLOB 1

BLOB indicates that the tree entry is a blob. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

TREE 2

TREE indicates that the tree entry is a tree, which may be the case for subdirectories. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

TAG 3

TAG indicates that the tree entry is a tag. This case should never happen. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

CommitService

CommitService is a service which provides RPCs that interact with Git

commits.

Method NameRequest TypeResponse TypeDescription
ListCommits ListCommitsRequest ListCommitsResponse stream

ListCommits lists all commits reachable via a set of references by doing a graph walk. This deprecates FindAllCommits and FindCommits (except Follow is not yet supported). Any unknown revisions will cause the RPC to fail.

ListAllCommits ListAllCommitsRequest ListAllCommitsResponse stream

ListAllCommits lists all commits present in the repository, including those not reachable by any reference.

CommitIsAncestor CommitIsAncestorRequest CommitIsAncestorResponse

CommitIsAncestor checks whether a provided commit is the ancestor of another commit.

TreeEntry TreeEntryRequest TreeEntryResponse stream

TreeEntry provides the tree entry for the provided path and revision. The data is broken into chunks and streamed.

CountCommits CountCommitsRequest CountCommitsResponse

CountCommits provides the number of commits which adhere to the given filters.

CountDivergingCommits CountDivergingCommitsRequest CountDivergingCommitsResponse

CountDivergingCommits provides the number of diverging commits between two revisions.

GetTreeEntries GetTreeEntriesRequest GetTreeEntriesResponse stream

GetTreeEntries provides the tree entries for the provided path and revision. This includes subtrees present under the tree with the option of recursive fetching.

ListFiles ListFilesRequest ListFilesResponse stream

ListFiles lists all the files (including files in sub-dirs) present in the working tree of a given treeish.

FindCommit FindCommitRequest FindCommitResponse

FindCommit finds a commit for a given commitish. Returns nil if the commit is not found.

CommitStats CommitStatsRequest CommitStatsResponse

CommitStats provides the stats for a given commitish.

FindAllCommits FindAllCommitsRequest FindAllCommitsResponse stream

FindAllCommits lists all the commits which can be traversed from the provided commitish.

FindCommits FindCommitsRequest FindCommitsResponse stream

FindCommits lists all the commits which are associated with the provided revision and paths.

CommitLanguages CommitLanguagesRequest CommitLanguagesResponse

CommitLanguages detects the source code languages of the whole tree for a given commit. Returns an error in case no languages could be detected.

RawBlame RawBlameRequest RawBlameResponse stream

RawBlame blames lines in a blob to when they have last been changed. Returns the raw output of the git-blame(1) command.

LastCommitForPath LastCommitForPathRequest LastCommitForPathResponse

LastCommitForPath returns the last commit that has changed a given path. The following special cases apply and have grown historically: - Absolute paths that or relative paths that escape the repository root will cause an error. - A nonexistent path inside the repository leads to a successful but empty response.

ListLastCommitsForTree ListLastCommitsForTreeRequest ListLastCommitsForTreeResponse stream

ListLastCommitsForTree lists the last commits for a given tree.

CommitsByMessage CommitsByMessageRequest CommitsByMessageResponse stream

CommitsByMessage list commits which match the provided query.

ListCommitsByOid ListCommitsByOidRequest ListCommitsByOidResponse stream

ListCommitsByOid lists the commits for the provided commitish object IDs.

ListCommitsByRefName ListCommitsByRefNameRequest ListCommitsByRefNameResponse stream

ListCommitsByRefName lists the commits for the provided references.

FilterShasWithSignatures FilterShasWithSignaturesRequest stream FilterShasWithSignaturesResponse stream

FilterShasWithSignatures filters out signed commits.

GetCommitSignatures GetCommitSignaturesRequest GetCommitSignaturesResponse stream

GetCommitSignatures parses the commit signature information for the provided commitish object IDs. The RPC doesn't use 'mailmap' to ensure that signature verification is done against the original information which contains the non-mapped commit author.

GetCommitMessages GetCommitMessagesRequest GetCommitMessagesResponse stream

GetCommitMessages returns the commits messages for the provided commitish object IDs.

CheckObjectsExist CheckObjectsExistRequest stream CheckObjectsExistResponse stream

CheckObjectsExist will check for the existence of revisions against a repository. It returns two sets of data. An array containing the revisions from the input that it found on the repository, and an array that contains all revisions from the input it did not find on the repository.

conflicts.proto

Top

ConflictFile

ConflictFile contains conflicted file information.

FieldTypeLabelDescription
header ConflictFileHeader

header contains the header information about a conflicted file.

content bytes

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.

ConflictFileHeader

ConflictFileHeader contains parsed conflicted file information from the `git-merge-tree(1)`

output for an individual file.

FieldTypeLabelDescription
commit_oid string

commit_oid is the tree-ish revision being merged into.

their_path bytes

their_path is the path of the conflicted file being merged from.

our_path bytes

our_path is the path of the conflicted file being merged into.

our_mode int32

our_mode is the mode of the conflicted file being merged into.

ancestor_path bytes

ancestor_path is path of the conflicted file for the merge base.

ListConflictFilesRequest

ListConflictFilesRequest is the request for the ListConflictFilesRequest rpc.

FieldTypeLabelDescription
repository Repository

repository is the repository for which we want to list the conflicted files.

our_commit_oid string

our_commit_oid is the tree-ish OID to merge into.

their_commit_oid string

their_commit_oid is the tree-ish OID to merge from.

allow_tree_conflicts bool

allow_tree_conflicts will not cause the request to fail in case there are tree conflicts. If set to true, then responses may contain conflict files where some of the paths are unset.

skip_content bool

skip_content will skip the parsing and streaming of conflicted file's content. This can be useful when we only want to know if there is a conflict and which files are conflicted but don't care about the contents of the conflicted files.

ListConflictFilesResponse

ListConflictFilesResponse is the response for the ListConflicts RPC.

FieldTypeLabelDescription
files ConflictFile repeated

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.

ResolveConflictsRequest

ResolveConflictsRequest is a request for the ResolveConflicts RPC.

FieldTypeLabelDescription
header ResolveConflictsRequestHeader

header is the initial message specifying parameters of the RPC call.

files_json bytes

files_json is a JSON-encoded list of conflicts resolutions.

ResolveConflictsRequestHeader

ResolveConflictsRequestHeader is the first message that must be sent for

each ResolveConflicts call.

FieldTypeLabelDescription
repository Repository

repository is the repository in which conflicts shall be resolved and where SourceBranch shall be updated with the resolved conflict.

our_commit_oid string

our_commit_oid is the OID of the commit representing the local commit.

target_repository Repository

target_repository is the repository from which TheirCommitOid shall be retrieved.

their_commit_oid string

their_commit_oid is the OID of the commit representing the remote commit which is to be merged into the local commit.

source_branch bytes

source_branch is the branch on which the new commit shall be created.

target_branch bytes

target_branch identifies the branch which will be fetched from target_repository in case TheirCommitOid does not exist in Repository.

commit_message bytes

commit_message is the message of the newly created merge commit.

user User

user is the user used as author and committer of the newly created merge commit.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the commit as committer date. If it's not set, the current time will be used.

ResolveConflictsResponse

ResolveConflictsResponse is a response of the ResolveConflicts RPC. Conflict

resolution may have failed even if the RPC has returned OK. The user must

check ResolutionError to verify whether the merge commit was correctly

computed or not.

FieldTypeLabelDescription
resolution_error string

resolution_error contains a description of why conflict resolution has failed.

ConflictsService

ConflictsService is a service which provides RPCs to interact with conflicts

resulting from a merge.

Method NameRequest TypeResponse TypeDescription
ListConflictFiles ListConflictFilesRequest ListConflictFilesResponse stream

ListConflictFiles returns all conflicting files which result from a merge of two specified commit objects.

ResolveConflicts ResolveConflictsRequest stream ResolveConflictsResponse

ResolveConflicts tries to resolve a conflicting merge with a set of user-provided merge resolutions. If resolving the conflict succeeds, the result will be a new merge commit.

diff.proto

Top

BaseWithRevisions

BaseWithRevisions is a specification with a base and two revisions.

FieldTypeLabelDescription
base string

base is the merge base revision.

rev1 string

rev1 is the first revision.

rev2 string

rev2 is the the second revision.

ChangedPaths

ChangedPaths contains information about a changed file. It includes the path

of the file, and the status of the change.

FieldTypeLabelDescription
path bytes

path is the path of the change in question.

status ChangedPaths.Status

status is the type of change.

old_mode int32

old_mode is the mode of the changed path previous to the change. May be one of the following values: - 0o000000 if the path does not exist. - 0o100644 if the path refers to a normal file. - 0o100755 if the path refers to an executable file. - 0o040000 if the path refers to a tree entry. - 0o160000 if the path refers to a submodule.

new_mode int32

new_mode is the mode of the changed path after the change. Please refer to `old_mode` for a list of potential values.

old_blob_id string

old_blob_id is the blob oid of the changed path previous to the change.

new_blob_id string

new_blob_id is the blob oid of the changed path after the changed.

old_path bytes

old_path is the pre-image path of a renamed or copied object. This field is empty for all other change types.

score int32

score denotes the similarity between the source and target. Only present for renames and copies.

CommitDelta

CommitDelta represents the metadata of a diff between two commits without the actual

patch data.

FieldTypeLabelDescription
from_path bytes

from_path is the path that to_path is getting compared to.

to_path bytes

to_path is the path that from_path is getting compared against.

from_id string

from_id is the id of the blob that is getting compared to.

to_id string

to_id is the id of the blob that is getting compared against.

old_mode int32

old_mode is the mode of the blob getting compared against.

new_mode int32

new_mode is the mode of the blob getting compared to.

CommitDeltaRequest

CommitDeltaRequest is a request for the CommitDelta RPC.

FieldTypeLabelDescription
repository Repository

repository is the one to get the commit deltas from.

left_commit_id string

left_commit_id is the left commit ID in <left commit>..<right commit>.

right_commit_id string

right_commit_id is the right commit ID in <left commit>..<right commit>.

paths bytes repeated

paths is a list of paths that limits the diff to those specific paths.

CommitDeltaResponse

CommitDeltaResponse is the response from a CommitDelta RPC call.

FieldTypeLabelDescription
deltas CommitDelta repeated

deltas is a list of CommitDeltas

CommitDiffRequest

CommitDiffRequest is a request for the CommitDiff RPC.

FieldTypeLabelDescription
repository Repository

repository is the one from which to get the diff.

left_commit_id string

left_commit_id is the left commit ID in <left commit>..<right commit>.

right_commit_id string

right_commit_id is the right commit ID in <left commit>..<right commit>.

paths bytes repeated

paths is a list of paths that limits the diff to those specific paths.

collapse_diffs bool

collapse_diffs causes patches to be emptied after safe_max_files, safe_max_files, or safe_max_lines is reached.

enforce_limits bool

enforce_limits causes parsing of diffs to stop if max_files, max_lines, or max_bytes is reached.

max_files int32

max_files is the maximum number of files in a diff. Once reached, parsing is stopped if enforce_limits is true.

max_lines int32

max_lines is the maximum number of lines in a diff. Once reached, parsing is stopped if enforce_limits is true.

max_bytes int32

max_bytes is the maximum number of bytes in a diff. Once reached, parsing is stopped if enforce_limits is true.

max_patch_bytes int32

max_patch_bytes is the limitation of a single diff patch, patches surpassing this limit are pruned by default. If this is 0 you will get back empty patches.

safe_max_files int32

safe_max_files is the maximum number of files in a diff. Once reached, patches are emptied if collapse_diffs is true.

safe_max_lines int32

safe_max_lines is the maximum number of lines in a diff. Once reached, patches are emptied if collapse_diffs is true.

safe_max_bytes int32

safe_max_bytes is the maximum number of bytes in a diff. Once reached, patches are emptied if collapse_diffs is true.

diff_mode CommitDiffRequest.DiffMode

diff_mode is the mode used for generating the diff. Please refer to the enum declaration for supported modes.

max_patch_bytes_for_file_extension CommitDiffRequest.MaxPatchBytesForFileExtensionEntry repeated

max_patch_bytes_for_file_extension is a map of file extension to max patch bytes for that extension. It overrides max patch bytes for file extension. If the file does not have an extension (eg Dockerfile), then the file name is used for matching. For files with more than on extension (eg file.html.tmpl) only the last extension is matched.

whitespace_changes CommitDiffRequest.WhitespaceChanges

whitespace_changes states which whitespace changes should be included in the diff. Please refer to the enum declaration for supported modes.

collect_all_paths bool

collect_all_paths can be set when you want to get back all files, even when the enforced limits are hit. Responses sent when the limits were hit will have the path filled in, have the `overflow_marker` set, but have no patch data.

CommitDiffRequest.MaxPatchBytesForFileExtensionEntry

FieldTypeLabelDescription
key string

value int32

CommitDiffResponse

CommitDiffResponse corresponds to a single changed file in a commit.

FieldTypeLabelDescription
from_path bytes

from_path is the path that to_path is getting compared to.

to_path bytes

to_path is the path that from_path is getting compared against.

from_id string

from_id is the id of the blob that is getting compared against.

to_id string

to_id is the id of the blob that is getting compared to.

old_mode int32

old_mode is the mode of the file getting compared against.

new_mode int32

new_mode is the mode of the file getting compared to.

binary bool

binary indicates whether or not binary data is getting compared.

raw_patch_data bytes

raw_patch_data is the unparsed data of the diff.

end_of_patch bool

end_of_patch indicates if this message represents the end of the diff.

overflow_marker bool

overflow_marker Indicates if the diff file exceeded limitations, in which case there will be no patch data sent, only information about the patch.

collapsed bool

collapsed indicates the patch surpassed a "safe" limit and was therefore pruned, but the client may still request the full patch on a separate request.

too_large bool

too_large indicates the patch was pruned since it surpassed a hard limit, and can therefore not be expanded.

DiffBlobsRequest

DiffBlobsRequest is a request for the DiffBlobs RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository the blob diff is generated for.

blob_pairs DiffBlobsRequest.BlobPair repeated

blob_pairs defines the set of blob pairs to generate diffs for.

diff_mode DiffBlobsRequest.DiffMode

diff_mode is the mode used for generating the diff. Refer to the enum declaration above for supported modes.

whitespace_changes DiffBlobsRequest.WhitespaceChanges

whitespace_changes states which whitespace changes should be included in the diff. Refer to the enum declaration above for supported modes.

patch_bytes_limit int32

patch_bytes_limit is the max size in bytes of a single patch generated from a pair of blobs. Patches surpassing this limit are pruned. If set to zero, no limit is enforced.

raw_info ChangedPaths repeated

raw_info is the set of file pairs in raw format used to compute diffs for.

DiffBlobsRequest.BlobPair

BlobPair defines a pair of blobs a patch is generated for.

FieldTypeLabelDescription
left_blob bytes

left_blob is the left blob in <left blob>..<right blob>. Can be either a path-scoped revision or blob ID.

right_blob bytes

right_blob is the right blob in <left blob>..<right blob>. Can be either a path-scoped revision or blob ID.

DiffBlobsResponse

DiffBlobsResponse is a response for the DiffBlobs RPC.

FieldTypeLabelDescription
left_blob_id string

left_blob_id is the left blob ID in in <left blob>..<right blob> of the diffed blob.

right_blob_id string

right_blob_id is the right blob ID in in <left blob>..<right blob> of the diffed blob.

patch bytes

patch is the raw generated diff output.

status DiffBlobsResponse.Status

status is the current state of the patch being transmitted.

binary bool

binary indicates whether or not the diff compares binary data. If Git considers either blob to be binary, Git only reports whether the files differ.

over_patch_bytes_limit bool

over_patch_bytes_limit indicates the patch was pruned since it surpassed the set limit.

patch_size int32

patch_size is the size of the patch in bytes and is always returned even if a patch is pruned. To improve performance, a client may make an initial DiffBlobs request with a lower "soft" patch_bytes_limit to avoid receiving large patches. If a patch exceeds this byte limit and gets pruned, the patch size can be used by the client to determine whether it is sensible to make a follow-up DiffBlobs request by increasing the patch_bytes_limit to a "hard" limit.

DiffStats

DiffStats represents diff statistics for a path.

FieldTypeLabelDescription
path bytes

path is the path of the change.

additions int32

additions is the number of additions in a diff.

deletions int32

deletions is the number of deletions in a diff.

old_path bytes

old_path is the original path in the event of a rename.

DiffStatsRequest

DiffStatsRequest is a request for the DiffStats RPC.

FieldTypeLabelDescription
repository Repository

repository is the one to get diff stats from.

left_commit_id string

left_commit_id is the left commit ID in <left commit>..<right commit>

right_commit_id string

right_commit_id is the right commit ID in <left commit>..<right commit>

DiffStatsResponse

DiffStatsResponse is a response for the DiffStats RPC.

FieldTypeLabelDescription
stats DiffStats repeated

stats is a list of DiffStats.

FindChangedPathsRequest

FindChangedPathsRequest is the request for the FindChangedPaths RPC.

Given a list of commits, return the files changed. Each commit is compared

to its parent. Merge commits will show files which are different to all of

its parents.

FieldTypeLabelDescription
repository Repository

repository is the repository the changed paths are computed in.

commits string repeated

Deprecated. commits is the list of commits to compare to their parents. This field is deprecated. To adapt to the new calling convention you can create one `CommitRequest` per commit, where each `CommitRequest` has only the `commit_revision` field.

requests FindChangedPathsRequest.Request repeated

requests specifies the requests of what to compare.

merge_commit_diff_mode FindChangedPathsRequest.MergeCommitDiffMode

merge_commit_diff_mode controls how merge commits are treated.

find_renames bool

find_renames toggles rename detection on the files in the diff.

Fields with deprecated option

Name Option
commits

true

FindChangedPathsRequest.Request

Request is a single request to pass to git diff-tree.

FieldTypeLabelDescription
tree_request FindChangedPathsRequest.Request.TreeRequest

tree_request is a request comparing two trees with each other.

commit_request FindChangedPathsRequest.Request.CommitRequest

commit_request is a request comparing one or more commits with each other.

FindChangedPathsRequest.Request.CommitRequest

CommitRequest compares a commit to its parents (or some other commits.)

FieldTypeLabelDescription
commit_revision string

commit_revision is the revision of the commit that should be compared. If no `parent_commit_revisions` are given, then the commit will be compared against its parents. The revision needs to peel to a commit object.

parent_commit_revisions string repeated

parent_commit_revisions are the revisions of commits to treat as the commit's parents. This is an optional field: if not specified, the actual parents of the commit referred to by `commit_revision` are used.

FindChangedPathsRequest.Request.TreeRequest

TreeRequest compares two trees.

FieldTypeLabelDescription
left_tree_revision string

left_tree_revision is the revision of the left tree to compare. Accepts any revision that peels to a tree object.

right_tree_revision string

right_tree_revision is the revision of the right tree to compare. Accepts any revision that peels to a tree object.

FindChangedPathsResponse

FindChangedPathsResponse is the response for the FindChangedPaths RPC.

Returns a list of files that have been changed in the commits given.

FieldTypeLabelDescription
paths ChangedPaths repeated

paths contains the attributes for one changed file. In case of merge commits, or when comparing three or more commits, a file might be included more than once if it was changed between multiple commits.

GetPatchIDRequest

GetPatchIDRequest is a request for the GetPatchID RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository the patch ID shall be computed in.

old_revision bytes

old_revision is the old revision that shall be used to compute the patch from that will then be passed to git-patch-id(1). Accepts revisions as specified in gitrevisions(5).

new_revision bytes

new_revision is the new revision that shall be used to compute the patch from that will then be passed to git-patch-id(1). Accepts revisions as specified in gitrevisions(5).

GetPatchIDResponse

GetPatchIDResponse is a response for the GetPatchID RPC.

FieldTypeLabelDescription
patch_id string

patch_id is the patch ID that was generated by hashing the diff of the given old and new revision.

RangeDiffRequest

RangeDiffRequest is the range diff request.

FieldTypeLabelDescription
repository Repository

repository is the one to get range diff output from.

range_pair RangePair

range_pair specifies format: <range1> <range2>.

revision_range RevisionRange

revision_range specifies format: <rev1>...<rev2>.

base_with_revisions BaseWithRevisions

base_with_revisions specifies format: <base> <rev1> <rev2>.

RangeDiffResponse

RangeDiffResponse contains the data from a commit pair line and its following patch if any.

FieldTypeLabelDescription
from_commit_id string

from_commit_id is the left side commit id in the commit pair line.

to_commit_id string

to_commit_id is the right side commit id in the commit pair line.

comparison RangeDiffResponse.Comparator

comparison is the comparison result of the two commits.

commit_message_title string

commit_message_title is the commit message title of the commit.

patch_data bytes

patch_data is the range diff patch data if two commits are not equal.

end_of_patch bool

end_of_patch check if the patch data is the last one response of this commit pair.

RangePair

RangePair is a pair of commit ranges.

FieldTypeLabelDescription
range1 string

range1 is the first range, e.g. <base>..<rev>, <rev>^!

range2 string

range2 is the second range.e.g. <base>..<rev>, <rev>^!

RawDiffRequest

RawDiffRequest is a request for the RawDiff RPC.

FieldTypeLabelDescription
repository Repository

repository is the one to get the diff from.

left_commit_id string

left_commit_id is the left commit ID in <left commit>..<right commit>.

right_commit_id string

right_commit_id is the right commit ID in <left commit>..<right commit>.

RawDiffResponse

RawDiffResponse is a response for the RawDiff RPC.

FieldTypeLabelDescription
data bytes

data is a sequence of bytes representing the unmodified diff patch data returned from git-diff(1).

RawPatchRequest

RawPatchRequest is a request for the RawPatch RPC.

FieldTypeLabelDescription
repository Repository

repository is the one to get the patch from.

left_commit_id string

left_commit_id is the left commit ID in <left commit>..<right commit>.

right_commit_id string

right_commit_id is the right commit ID in <left commit>..<right commit>

RawPatchResponse

RawPatchResponse is a response for the RawPatch RPC.

FieldTypeLabelDescription
data bytes

data is a sequence of bytes representing the unmodified diff patch data returned from git-format-patch(1).

RawRangeDiffRequest

RawRangeDiffRequest is the raw range diff request.

FieldTypeLabelDescription
repository Repository

repository is the one to get range diff output from.

range_pair RangePair

range_pair specifies format: <range1> <range2>.

revision_range RevisionRange

revision_range specifies format: <rev1>...<rev2>.

base_with_revisions BaseWithRevisions

base_with_revisions specifies format: <base> <rev1> <rev2>.

RawRangeDiffResponse

RawRangeDiffResponse is the the raw range diff response.

FieldTypeLabelDescription
data bytes

data is the raw range diff data.

RevisionRange

RevisionRange is a specification of revisions using the '...' notation.

FieldTypeLabelDescription
rev1 string

rev1 is the first revision.

rev2 string

rev2 is the the second revision.

ChangedPaths.Status

Status is an enum representing the type of change.

NameNumberDescription
ADDED 0

ADDED indicates a file was added. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

MODIFIED 1

MODIFIED indicates a file was modified. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

DELETED 2

DELETED indicates a file was deleted. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

TYPE_CHANGE 3

TYPE_CHANGE indicates change in the type of the file (regular file, symbolic link or submodule). protolint:disable:this ENUM_FIELD_NAMES_PREFIX

COPIED 4

COPIED indicates Git determined the file was copied. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

RENAMED 5

RENAMED indicates Git determined the file was renamed. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

CommitDiffRequest.DiffMode

DiffMode determines the type of diff that will be returned.

NameNumberDescription
DEFAULT 0

DEFAULT is the standard diff mode and results in a linewise diff for textfiles. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

WORDDIFF 1

WORDDIFF is a word diff and computes the diff for whitespace separated words instead of for whole lines. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

CommitDiffRequest.WhitespaceChanges

WhitespaceChanges states which whitespace changes we should ignore. These options correlate to

the ones present in git-diff(1).

NameNumberDescription
WHITESPACE_CHANGES_UNSPECIFIED 0

WHITESPACE_CHANGES_UNSPECIFIED is used to not ignore any whitespace changes.

WHITESPACE_CHANGES_IGNORE 1

WHITESPACE_CHANGES_IGNORE specifies to use the `--ignore-space-change` flag of git-diff(1). Only changes in amount of whitespace are ignored.

WHITESPACE_CHANGES_IGNORE_ALL 2

WHITESPACE_CHANGES_IGNORE_ALL specifies to use the `--ignore-all-space` flag of git-diff(1). all whitespace characters are ignored when comparing lines.

DiffBlobsRequest.DiffMode

DiffMode determines the type of diff that will be returned.

NameNumberDescription
DIFF_MODE_UNSPECIFIED 0

DIFF_MODE_UNSPECIFIED is the standard diff mode and results in a line diff for text files.

DIFF_MODE_WORD 1

DIFF_MODE_WORD is a word diff and computes the diff for whitespace separated words instead of for whole lines by using the `--word-diff=porcelain` option.

DiffBlobsRequest.WhitespaceChanges

WhitespaceChanges states which whitespace changes we should ignore. These options correlate to

the ones present in git-diff(1).

NameNumberDescription
WHITESPACE_CHANGES_UNSPECIFIED 0

WHITESPACE_CHANGES_UNSPECIFIED is used to not ignore any whitespace changes.

WHITESPACE_CHANGES_IGNORE 1

WHITESPACE_CHANGES_IGNORE specifies to use the `--ignore-space-change` flag of git-diff(1). Only changes in amount of whitespace are ignored.

WHITESPACE_CHANGES_IGNORE_ALL 2

WHITESPACE_CHANGES_IGNORE_ALL specifies to use the `--ignore-all-space` flag of git-diff(1). all whitespace characters are ignored when comparing lines.

DiffBlobsResponse.Status

Status defines the state of a patch at a given response message.

NameNumberDescription
STATUS_INCOMPLETE 0

STATUS_INCOMPLETE indicates the patch has not been completely transmitted. Subsequent response messages contain the remaining content of the patch. protolint:disable:this ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

STATUS_END_OF_PATCH 1

STATUS_END_OF_PATCH indicates the patch was completely parsed and sent. Subsequent response messages contain the content of the next patch in the diff.

FindChangedPathsRequest.MergeCommitDiffMode

MergeCommitDiffMode controls which mode to use to produce diff output for merge commits

NameNumberDescription
MERGE_COMMIT_DIFF_MODE_UNSPECIFIED 0

MERGE_COMMIT_DIFF_MODE_UNSPECIFIED is the default value. It is equivalent to DIFF_MODE_INCLUDE_MERGES.

MERGE_COMMIT_DIFF_MODE_INCLUDE_MERGES 1

MERGE_COMMIT_DIFF_MODE_INCLUDE_MERGES tells git to also show differences for merge commits. Please refer to the documentation of the `-m` flag of git-diff-tree(1).

MERGE_COMMIT_DIFF_MODE_ALL_PARENTS 2

MERGE_COMMIT_DIFF_MODE_ALL_PARENTS tells git to only show differences for files which were modified from all parents. Please refer to the documentation of the `-c` flag of git-diff-tree(1).

RangeDiffResponse.Comparator

Comparator is the comparison state of the two commits (= , > , < , !).

NameNumberDescription
COMPARATOR_EQUAL_UNSPECIFIED 0

COMPARATOR_EQUAL_UNSPECIFIED specifies =.

COMPARATOR_GREATER_THAN 1

COMPARATOR_GREATER_THAN specifies >.

COMPARATOR_LESS_THAN 2

COMPARATOR_LESS_THAN specifies <.

COMPARATOR_NOT_EQUAL 3

COMPARATOR_NOT_EQUAL specifies !.

DiffService

DiffService is a service which provides RPCs to inspect differences

introduced between a set of commits.

Method NameRequest TypeResponse TypeDescription
CommitDiff CommitDiffRequest CommitDiffResponse stream

CommitDiff returns a diff between two different commits. The patch data is chunked across messages and get streamed back to the client.

CommitDelta CommitDeltaRequest CommitDeltaResponse stream

CommitDelta returns the deltas between two different commits. A delta includes everything that changed about a set of paths except for the actual diff.

RawDiff RawDiffRequest RawDiffResponse stream

RawDiff returns a diff between two commits. The output is the unmodified output from git-diff(1). This is not to be confused with git-diff(1)'s --raw mode.

RawPatch RawPatchRequest RawPatchResponse stream

RawPatch returns a diff between two commits in a formatted patch.The output is the unmodified output from git-format-patch(1). This is not to be confused with git-diff(1)'s --raw mode.

DiffStats DiffStatsRequest DiffStatsResponse stream

DiffStats returns the diff stats between two commits such as number of lines changed, etc.

FindChangedPaths FindChangedPathsRequest FindChangedPathsResponse stream

FindChangedPaths returns a list of files changed along with the status of each file

GetPatchID GetPatchIDRequest GetPatchIDResponse

GetPatchID computes a patch ID for a patch. Patch IDs are a unique ID computed by hashing a patch with some parameters like line numbers ignored. The patch ID can thus be used to compare whether diffs make the same change. Please refer to git-patch-id(1) for further information. If the difference between old and new change is empty then this RPC returns an error. VerbatimPatchID feature flag can be switched on to enable --verbatim mode to not strip whitespace changes before generating a patch ID. Whitespace changes can affect the underlying functionality of the code depending on the language used so it's preferable to default to that option.

RawRangeDiff RawRangeDiffRequest RawRangeDiffResponse stream

RawRangeDiff outputs the raw range diff data for a given range specification.

RangeDiff RangeDiffRequest RangeDiffResponse stream

RangeDiff outputs the parsed commit pairs from range diff for a given range specification.

DiffBlobs DiffBlobsRequest DiffBlobsResponse stream

DiffBlobs computes diffs between pairs of blobs. A batch of blob pairs is sent to the server. The resulting patches are then chucked across response messages and streamed to the client.

errors.proto

Top

AccessCheckError

AccessCheckError is an error returned by GitLab's `/internal/allowed`

endpoint.

FieldTypeLabelDescription
error_message string

error_message is the error message as returned by the endpoint.

protocol string

protocol is the protocol used.

user_id string

user_id is the user ID as which changes had been pushed.

changes bytes

changes is the set of changes which have failed the access check.

AmbiguousReferenceError

AmbiguousReferenceError is an error returned when an reference is unknown.

FieldTypeLabelDescription
reference bytes

reference is the reference passed to the git command.

BadObjectError

BadObjectError is an error returned when git cannot find a valid object based on its id.

FieldTypeLabelDescription
bad_oid bytes

bad_oid is the bad object id passed to the git command.

ChangesAlreadyAppliedError

ChangesAlreadyAppliedError is an error returned when the operation would

have resulted in no changes because these changes have already been applied.

CustomHookError

CustomHookError is an error returned when Gitaly executes a custom hook and the hook returns

a non-zero return code.

FieldTypeLabelDescription
stdout bytes

stdout is the standard output of the hook that has failed, if any. Data may be truncated.

stderr bytes

stderr is the standard error of the hook that has failed, if any. Data may be truncated.

hook_type CustomHookError.HookType

hook_type is the type of the hook.

IndexError

IndexError is an error returned when an operation fails to due a conflict with

the repository index.

FieldTypeLabelDescription
path bytes

path is the file or directory path that triggered the error.

error_type IndexError.ErrorType

error_type is the type of index error that occurred.

InvalidRefFormatError

InvalidRefFormatError is an error returned when refs have an invalid format.

FieldTypeLabelDescription
refs bytes repeated

refs are the offending refs with invalid formats.

InvalidRevisionRange

InvalidRevisionRange is an error returned when the range given to the git log command is invalid.

FieldTypeLabelDescription
range bytes

range is the commit range passed to git log command.

LimitError

LimitError is an error returned when Gitaly enforces request limits.

FieldTypeLabelDescription
error_message string

error_message provides context into why a limit was enforced.

retry_after google.protobuf.Duration

retry_after provides the duration after which a retry is safe. 0 indicates non-retryable.

MergeConflictError

MergeConflictError is an error returned in the case when merging two commits

fails due to a merge conflict.

FieldTypeLabelDescription
conflicting_files bytes repeated

conflicting_files is the set of files which have been conflicting. If this field is empty, then there has still been a merge conflict, but it wasn't able to determine which files have been conflicting.

conflicting_commit_ids string repeated

conflicting_commit_ids is the set of commit IDs that caused the conflict. In the general case, this should be set to two commit IDs.

NotAncestorError

NotAncestorError is an error returned when parent_revision is not an ancestor

of the child_revision.

FieldTypeLabelDescription
parent_revision bytes

parent_revision is the revision checked against ChildRevision for whether it is an ancestor of ChildRevision

child_revision bytes

child_revision is the revision checked against ParentRevision for whether it is a descendent of ChildRevision.

PathError

PathError is an error returned when there is an issue with the path provided.

FieldTypeLabelDescription
path bytes

path is the file or directory path that triggered the error. The path may be truncated due to size limits.

error_type PathError.ErrorType

error_type is the type of path error that occurred.

PathNotFoundError

PathNotFoundError is an error returned when a given path cannot be found.

FieldTypeLabelDescription
path bytes

path is the path that could not be found.

ReferenceExistsError

ReferenceExistsError is an error returned when a reference that ought not to exist does exist

already.

FieldTypeLabelDescription
reference_name bytes

reference_name is the name of the reference that exists already.

oid string

oid is the object ID of the reference that preexists already.

ReferenceNotFoundError

ReferenceNotFoundError is an error returned when a reference that ought to exist does not exist.

FieldTypeLabelDescription
reference_name bytes

reference_name is the name of the reference that does not exist.

ReferenceStateMismatchError

ReferenceStateMismatchError is an error returned when updating a reference fails because its pointing to a different

object ID than expected.

FieldTypeLabelDescription
reference_name bytes

reference_name is the name of the reference that was failed to update.

expected_object_id bytes

expected_object_id is the object ID that the reference was expected to point to but didn't.

actual_object_id bytes

actual_object_id is the object ID that the reference actually pointed to at the time when it was tried to be updated.

ReferenceUpdateError

ReferenceUpdateError is an error returned when updating a reference has

failed.

FieldTypeLabelDescription
reference_name bytes

reference_name is the name of the reference that failed to be updated.

old_oid string

old_oid is the object ID the reference should have pointed to before the update.

new_oid string

new_oid is the object ID the reference should have pointed to after the update.

ReferencesLockedError

ReferencesLockedError is an error returned when an ref update fails because

the references have already been locked by another process.

FieldTypeLabelDescription
refs bytes repeated

refs are the references that could not be locked.

RemoteNotFoundError

RemoteNotFoundError is an error returned when a repository is not found at given remote URL.

ResolveRevisionError

ResolveRevisionError is an error returned when resolving a specific revision

has failed.

FieldTypeLabelDescription
revision bytes

revision is the name of the revision that was tried to be resolved.

CustomHookError.HookType

HookType is the type of the hook that has been running. Please consult githooks(5) for more

information about the specific types.

NameNumberDescription
HOOK_TYPE_UNSPECIFIED 0

HOOK_TYPE_UNSPECIFIED is the default hook type and should never be set.

HOOK_TYPE_PRERECEIVE 1

HOOK_TYPE_PRERECEIVE is executed after all changes have been written into a temporary staging directory, but before any references in the repository have been updated. It is executed with all references that are about to be updated at once. If this hook exits, then no references will have been updated in the repository and staged objects will have been discarded.

HOOK_TYPE_UPDATE 2

HOOK_TYPE_UPDATE is executed after the pre-receive hook. It is executed per reference that is about to be updated and can be used to reject only a subset of reference updates. If this hook error is raised then a subset of references may have already been updated.

HOOK_TYPE_POSTRECEIVE 3

HOOK_TYPE_POSTRECEIVE is executed after objects have been migrated into the repository and after references have been updated. An error in this hook will not impact the changes anymore as everything has already been persisted.

IndexError.ErrorType

ErrorType is the type of error encountered on the index operation.

NameNumberDescription
ERROR_TYPE_UNSPECIFIED 0

ERROR_TYPE_UNSPECIFIED is the default error type and should never be set.

ERROR_TYPE_EMPTY_PATH 1

ERROR_TYPE_EMPTY_PATH indicates an empty path was provided by the caller.

ERROR_TYPE_INVALID_PATH 2

ERROR_TYPE_INVALID_PATH indicates a path either contained '.git', or was incorrectly formatted, e.g. invalid://file/path.

ERROR_TYPE_DIRECTORY_EXISTS 3

ERROR_TYPE_DIRECTORY_EXISTS indicates the directory being created already exists.

ERROR_TYPE_DIRECTORY_TRAVERSAL 4

ERROR_TYPE_DIRECTORY_TRAVERSAL indicates the path contains a directory traversal sequence.

ERROR_TYPE_FILE_EXISTS 5

ERROR_TYPE_FILE_EXISTS indicates the file being created already exists.

ERROR_TYPE_FILE_NOT_FOUND 6

ERROR_TYPE_FILE_NOT_FOUND indicates the file being updated does not exist.

PathError.ErrorType

ErrorType is the type of error encountered.

NameNumberDescription
ERROR_TYPE_UNSPECIFIED 0

ERROR_TYPE_UNSPECIFIED is the default error type and should never be set.

ERROR_TYPE_EMPTY_PATH 1

ERROR_TYPE_EMPTY_PATH is the error type when the provided path is empty.

ERROR_TYPE_RELATIVE_PATH_ESCAPES_REPOSITORY 2

ERROR_TYPE_RELATIVE_PATH_ESCAPES_REPOSITORY is the error type when there are traversing components found in the path and it either escapes the repository or is not supported by the RPC.

ERROR_TYPE_ABSOLUTE_PATH 3

ERROR_TYPE_ABSOLUTE_PATH is the error type when an absolute path is provided while a relative path was expected.

ERROR_TYPE_LONG_PATH 4

ERROR_TYPE_LONG_PATH is the error type when the path is too long.

hook.proto

Top

PackObjectsHookWithSidechannelRequest

PackObjectsHookWithSidechannelRequest ...

FieldTypeLabelDescription
repository Repository

repository ...

args string repeated

args contains the arguments passed to the pack-objects hook, without the leading "git"

gl_id string

gl_id is the user id of the initator of the fetch

gl_username string

gl_username is the username of the initator of the fetch

git_protocol string

git_protocol is the protocol used for the fetch

remote_ip string

remote_ip is the original IP of the initator of the fetch. This field is used as the key for concurrency limiting before we trigger git-pack-objects command

environment_variables string repeated

environment_variables contains the environment variables passed to the hook invocation.

PackObjectsHookWithSidechannelResponse

PackObjectsHookWithSidechannelResponse ...

PostReceiveHookRequest

PostReceiveHookRequest ...

FieldTypeLabelDescription
repository Repository

repository ...

environment_variables string repeated

environment_variables ...

stdin bytes

stdin ...

git_push_options string repeated

git_push_options ...

PostReceiveHookResponse

PostReceiveHookResponse ...

FieldTypeLabelDescription
stdout bytes

stdout ...

stderr bytes

stderr ...

exit_status ExitStatus

exit_status ...

PreReceiveHookRequest

PreReceiveHookRequest ...

FieldTypeLabelDescription
repository Repository

repository ...

environment_variables string repeated

environment_variables ...

stdin bytes

stdin ...

git_push_options string repeated

git_push_options ...

PreReceiveHookResponse

PreReceiveHookResponse ...

FieldTypeLabelDescription
stdout bytes

stdout ...

stderr bytes

stderr ...

exit_status ExitStatus

exit_status ...

ProcReceiveHookRequest

ProcReceiveHookRequest is the request for the ProcReceiveHook RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository the hook operates on. This field is unused currently since we gather all information from stdin.

environment_variables string repeated

environment_variables is the set of env variables to be passed to the RPC.

stdin bytes

stdin is a chunk of raw data which the hook receives.

ProcReceiveHookResponse

ProcReceiveHookResponse is the response for the ProcReceiveHook RPC.

FieldTypeLabelDescription
stdout bytes

stdout is a chunk of raw data to be output to stdout of the hook.

stderr bytes

stderr is a chunk of raw data to be output to stderr of the hook.

exit_status ExitStatus

exit_status is the exit status that the hooks outputs, this dictates the success/failure of git-receive-pack(1).

ReferenceTransactionHookRequest

ReferenceTransactionHookRequest ...

FieldTypeLabelDescription
repository Repository

repository ...

environment_variables string repeated

environment_variables ...

stdin bytes

stdin ...

state ReferenceTransactionHookRequest.State

state ...

ReferenceTransactionHookResponse

ReferenceTransactionHookResponse ...

FieldTypeLabelDescription
stdout bytes

stdout ...

stderr bytes

stderr ...

exit_status ExitStatus

exit_status ...

UpdateHookRequest

UpdateHookRequest ...

FieldTypeLabelDescription
repository Repository

repository ...

environment_variables string repeated

environment_variables ...

ref bytes

ref ...

old_value string

old_value ...

new_value string

new_value ...

UpdateHookResponse

UpdateHookResponse ...

FieldTypeLabelDescription
stdout bytes

stdout ...

stderr bytes

stderr ...

exit_status ExitStatus

exit_status ...

ReferenceTransactionHookRequest.State

State ...

NameNumberDescription
PREPARED 0

PREPARED ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

COMMITTED 1

COMMITTED ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

ABORTED 2

ABORTED ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

HookService

HookService is a service which provides the implementation of a subset of

Git hooks. These are typically invoked via the `gitaly-hooks` binary to

ensure that the actual hook logic is executed in the context of the server.

Method NameRequest TypeResponse TypeDescription
PreReceiveHook PreReceiveHookRequest stream PreReceiveHookResponse stream

PreReceiveHook ...

PostReceiveHook PostReceiveHookRequest stream PostReceiveHookResponse stream

PostReceiveHook ...

UpdateHook UpdateHookRequest UpdateHookResponse stream

UpdateHook ...

ReferenceTransactionHook ReferenceTransactionHookRequest stream ReferenceTransactionHookResponse stream

ReferenceTransactionHook ...

PackObjectsHookWithSidechannel PackObjectsHookWithSidechannelRequest PackObjectsHookWithSidechannelResponse

PackObjectsHookWithSidechannel is an optimized version of PackObjectsHook that uses a unix socket side channel.

ProcReceiveHook ProcReceiveHookRequest stream ProcReceiveHookResponse stream

ProcReceiveHook is a hook invoked by git-receive-pack(1) [1]. This hook is responsible for updating the relevant references and reporting the results back to receive-pack. [1]: https://git-scm.com/docs/githooks#proc-receive

internal.proto

Top

WalkReposRequest

WalkReposRequest ...

FieldTypeLabelDescription
storage_name string

storage_name ...

WalkReposResponse

WalkReposResponse ...

FieldTypeLabelDescription
relative_path string

relative_path ...

modification_time google.protobuf.Timestamp

modification_time is the modification time of the repository directory. This can be used as a proxy for when the repository was last modified.

InternalGitaly

InternalGitaly is a gRPC service meant to be served by a Gitaly node, but

only reachable by Praefect or other Gitalies

Method NameRequest TypeResponse TypeDescription
WalkRepos WalkReposRequest WalkReposResponse stream

WalkRepos walks the storage and streams back all known git repos on the requested storage

lint.proto

Top

OperationMsg

OperationMsg ...

FieldTypeLabelDescription
op OperationMsg.Operation

op ...

scope_level OperationMsg.Scope

scope_level indicates what level an RPC interacts with a server: - REPOSITORY: scoped to only a single repo - SERVER: affects the entire server and potentially all repos - STORAGE: scoped to a specific storage location and all repos within - PARTITION: scoped to a specific partition and all repos within

OperationMsg.Operation

Operation ...

NameNumberDescription
UNKNOWN 0

UNKNOWN ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

MUTATOR 1

MUTATOR ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

ACCESSOR 2

ACCESSOR ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

MAINTENANCE 3

MAINTENANCE ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

OperationMsg.Scope

Scope ...

NameNumberDescription
REPOSITORY 0

REPOSITORY ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

STORAGE 2

STORAGE ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

PARTITION 3

PARTITION ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

File-level Extensions

ExtensionTypeBaseNumberDescription
additional_repository bool .google.protobuf.FieldOptions 91236

additional_repository is used to mark additional repository.

partition_id bool .google.protobuf.FieldOptions 91237

partition_id is used to mark field containing id of affected partition. Random high number..

repository bool .google.protobuf.FieldOptions 91234

repository annotation is used mark field used as repository when parent message is marked as target or additional repository If this operation modifies a repository, this annotations will specify the location of the Repository field within the request message.

storage bool .google.protobuf.FieldOptions 91233

storage is used to mark field containing name of affected storage. Random high number..

target_repository bool .google.protobuf.FieldOptions 91235

target_repository is used to mark target repository.

op_type OperationMsg .google.protobuf.MethodOptions 82303

op_type ... Random high number..

intercepted bool .google.protobuf.ServiceOptions 82302

intercepted indicates whether the proxy intercepts and handles the call instead of proxying. Intercepted services do not require scope or operation annotations.

log.proto

Top

LSN

LSN serializes a log sequence number. It's used for storing a partition's

applied LSN in the database.

Schema for:

- `partition//applied_lsn`

FieldTypeLabelDescription
value uint64

value is an LSN pointing to a position in the log.

LogEntry

LogEntry is a single entry in a partition's write-ahead log.

Schema for :

- `partition//log/entry/`.

FieldTypeLabelDescription
relative_path string

relative_path is the relative path of the repository the changes in the log entry are targeting.

reference_transactions LogEntry.ReferenceTransaction repeated

reference_transactions contains the reference transactions this entry records. The logged reference updates have already passed through verification and are applied without any further checks. The reference transactions are applied in order.

repository_deletion LogEntry.RepositoryDeletion

repository_deletion, when set, indicates this log entry deletes the repository.

housekeeping LogEntry.Housekeeping

housekeeping, when set, indicates this log entry contains a housekeeping task.

operations LogEntry.Operation repeated

operations is an ordered list of operations to run in order to apply this log entry.

LogEntry.Housekeeping

Housekeeping models a housekeeping run. All of the operations are modeled by file system

operations. This message is still kept around for conflict checking concurrent housekeeping

runs.

FieldTypeLabelDescription
pack_refs LogEntry.Housekeeping.PackRefs

pack_refs signifies if the housekeeping run includes a pack-refs task.

offloading LogEntry.Housekeeping.Offloading

offloading, when set, indicates this log entry contains a offloading task.

LogEntry.Housekeeping.Offloading

Offloading models a offloading task.

LogEntry.Housekeeping.PackRefs

PackRefs models a pack-refs housekeeping task.

LogEntry.Operation

Operation models a single operation to be performed.

FieldTypeLabelDescription
create_hard_link LogEntry.Operation.CreateHardLink

create_hard_link creates a hard link in the storage.

remove_directory_entry LogEntry.Operation.RemoveDirectoryEntry

remove_directory_entry removes a directory entry from the storage.

create_directory LogEntry.Operation.CreateDirectory

create_directory creates a directory in the storage.

set_key LogEntry.Operation.SetKey

set_key sets a key with a given value in the key-value store.

delete_key LogEntry.Operation.DeleteKey

delete_key deletes a given key from the key-value store.

LogEntry.Operation.CreateDirectory

CreateDirectory creates a directory at a relative path.

FieldTypeLabelDescription
path bytes

path is a relative path where to create the directory.

mode uint32

mode is the file mode to set on the created directory.

CreateHardLink creates a hard link. The existing inode metadata, including

permissions, will be shared with all of the hard links to the same file.

FieldTypeLabelDescription
source_path bytes

source_path is the relative path of the file the hard link should point to.

source_in_storage bool

source_in_storage is set when the source path is relative to the storage root instead of the log entry.

destination_path bytes

destination_path is a relative path from the storage root to where the hard link should be created at.

LogEntry.Operation.DeleteKey

DeleteKey deletes a key from the key-value store.

FieldTypeLabelDescription
key bytes

key is the key to delete.

LogEntry.Operation.RemoveDirectoryEntry

RemoveDirectoryEntry removes a directory or a file

from the parent directory. When removing a directory,

it must be empty.

FieldTypeLabelDescription
path bytes

path is the relative path of the directory entry to remove in the storage.

LogEntry.Operation.SetKey

SetKey sets a key with a value in the key-value store.

FieldTypeLabelDescription
key bytes

key is the key to set.

value bytes

value is the value to set for the key.

LogEntry.ReferenceTransaction

ReferenceTransaction models a single reference transaction.

FieldTypeLabelDescription
changes LogEntry.ReferenceTransaction.Change repeated

changes are the reference changes performed in this reference transaction.

LogEntry.ReferenceTransaction.Change

Change models a single reference change.

FieldTypeLabelDescription
reference_name bytes

reference_name is the fully qualified name of the reference to update.

new_oid bytes

new_oid is the new oid to point the reference to. Deletions are denoted as the SHA1 or SHA256 zero OID depending on the hash type used in the repository.

new_target bytes

new_target is the new target reference that the reference will point to. This is used for symbolic reference updates such as the default branch update.

LogEntry.RepositoryDeletion

RepositoryDeletion models a repository deletion.

objectpool.proto

Top

CreateObjectPoolRequest

CreateObjectPoolRequest is a request for the CreateObjectPool RPC.

FieldTypeLabelDescription
object_pool ObjectPool

object_pool is the object pool to create. This field controls where exactly the object pool will be created.

origin Repository

origin is the repository from which the object pool shall be created.

CreateObjectPoolResponse

CreateObjectPoolResponse is a response for the CreateObjectPool RPC.

DeleteObjectPoolRequest

DeleteObjectPoolRequest is a request for the DeleteObjectPool RPC.

FieldTypeLabelDescription
object_pool ObjectPool

object_pool is the object pool that shall be deleted.

DeleteObjectPoolResponse

DeleteObjectPoolResponse is a response for the DeleteObjectPool RPC.

DisconnectGitAlternatesRequest

DisconnectGitAlternatesRequest is a request for the DisconnectGitAlternates RPC.

FieldTypeLabelDescription
repository Repository

repository is th repository that shall be disconnected from its object pool.

DisconnectGitAlternatesResponse

DisconnectGitAlternatesResponse is a response for the DisconnectGitAlternates RPC.

FetchIntoObjectPoolRequest

FetchIntoObjectPoolRequest is a request for the FetchIntoObjectPool RPC.

FieldTypeLabelDescription
origin Repository

origin is the repository to fetch changes from.

object_pool ObjectPool

object_pool is the repository to fetch changes into.

FetchIntoObjectPoolResponse

FetchIntoObjectPoolResponse is a response for the FetchIntoObjectPool RPC.

GetObjectPoolRequest

GetObjectPoolRequest is a request for the GetObjectPool RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository for which the object pool shall be retrieved.

GetObjectPoolResponse

GetObjectPoolResponse is a response for the GetObjectPool RPC.

FieldTypeLabelDescription
object_pool ObjectPool

object_pool is the object pool the repository is connected to. If the repository is not connected to any object pool, then this field will be empty.

LinkRepositoryToObjectPoolRequest

LinkRepositoryToObjectPoolRequest is a request for the LinkRepositoryToObjectPool RPC.

FieldTypeLabelDescription
object_pool ObjectPool

object_pool is the object pool to which the repository shall be linked to.

repository Repository

repository is the repository that shall be linked to the object pool.

LinkRepositoryToObjectPoolResponse

LinkRepositoryToObjectPoolResponse is a response for the LinkRepositoryToObjectPool RPC.

ObjectPoolService

ObjectPoolService is a service that manages the lifetime of object pools.

An object pool is a separate repository that can be linked to from multiple object pool members

in order to deduplicate common objects between them. This is mostly used in the context of

repository forks.

The typical lifetime of an object pool is as follows:

1. An object pool is created via CreateObjectPool from its primary pool member. Typically this

would be the repository that gets forked.

2. One or more repositories are linked to the object pool via LinkRepositoryToObjectPool. Each

object pool member linked to the repository will have its objects deduplicated when its

objects get repacked the next time.

3. The object pool is regularly updated via FetchIntoObjectPool. This is typically only done from

the primary object pool member.

4. Repositories may leave the object pool via DisconnectGitAlternates. There is not much of a

reason to do this for any repositories except for the primary object pool member in case it

for example becomes private.

5. When the object pool does not have any members anymore it gets deleted via DeleteObjectPool.

It is the responsibility of the caller to ensure that it really has no members left, else

any existing member will become corrupt.

Method NameRequest TypeResponse TypeDescription
CreateObjectPool CreateObjectPoolRequest CreateObjectPoolResponse

CreateObjectPool creates an object pool from a specific source repository. It will create the object pool by cloning all contents from that source repository. The source repository will not automatically be linked to the object pool, you need to call LinkRepositoryToObjectPool for this. If the object pool exists already this RPC returns an error with the FailedPrecondition gRPC error code.

DeleteObjectPool DeleteObjectPoolRequest DeleteObjectPoolResponse

DeleteObjectPool deletes the object pool. There are no safety checks in place, so if any repository is still using this object pool it will become corrupted.

LinkRepositoryToObjectPool LinkRepositoryToObjectPoolRequest LinkRepositoryToObjectPoolResponse

LinkRepositoryToObjectPool links the specified repository to the object pool. Objects contained in the object pool will be deduplicated for this repository when repacking objects.

DisconnectGitAlternates DisconnectGitAlternatesRequest DisconnectGitAlternatesResponse

DisconnectGitAlternates will disconnect the object pool member from its object pool. It will: 1. Link all objects from the object pool into the member repository. This essenitally reduplicates previously-duplicated objects so that the repository will continue to function after being unlinked. 2. Remove the alternates link to the object pool. 3. Perform a consistency check to assert that the repository is indeed fully functional after unlinking it from its pool. If the consistency check fails the alternates link is restored an the RPC fails. If successful, the object pool member is disconnected from the object pool and does not depend on it anymore. This RPC does not return an error in case the repository is not linked to any object pool.

FetchIntoObjectPool FetchIntoObjectPoolRequest FetchIntoObjectPoolResponse

FetchIntoObjectPool fetches all references from a pool member into an object pool so that objects shared between this repository and other pool members can be deduplicated. This RPC will perform housekeeping tasks after the object pool has been updated to ensure that the pool is in an optimal state.

GetObjectPool GetObjectPoolRequest GetObjectPoolResponse

GetObjectPool returns the object pool a repository is connected to. If the repository is not connected to a pool then this RPC returns successfully with an empty response.

operations.proto

Top

OperationBranchUpdate

OperationBranchUpdate contains the details of a branch update.

FieldTypeLabelDescription
commit_id string

commit_id is set to the OID of the created commit if a branch was created or updated.

repo_created bool

repo_created indicates whether the branch created was the first one in the repository. Used for cache invalidation in GitLab.

branch_created bool

branch_created indicates whether the branch already existed in the repository and was updated or whether it was created. Used for cache invalidation in GitLab.

UserApplyPatchRequest

UserApplyPatchRequest is a request for the UserApplyPatch RPC.

FieldTypeLabelDescription
header UserApplyPatchRequest.Header

header must be sent as the first message and contains information about how to apply the patches.

patches bytes

patches contains the patch data.

UserApplyPatchRequest.Header

Header contains information about how to apply the patches.

FieldTypeLabelDescription
repository Repository

repository is the repository to which the patches shall be applied to.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

target_branch bytes

target_branch is the branch onto which the patches shall be applied.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the squashed commit as committer date. If it's not set, the current time will be used.

expected_old_oid string

expected_old_oid is the object ID which branch is expected to point to. This is used as a safety guard to avoid races when branch has been updated meanwhile to point to a different object ID. If unset, the target branch will be overwritten regardless of its current state. If set, it must either contain a valid, full object ID or the zero object ID in case the branch should be created. Otherwise, this RPC will return an error.

UserApplyPatchResponse

UserApplyPatchResponse is a response for the UserApplyPatch RPC.

FieldTypeLabelDescription
branch_update OperationBranchUpdate

branch_update contains information about the updated branch.

UserCherryPickError

UserCherryPickError is an error returned by the UserCherryPick RPC.

FieldTypeLabelDescription
cherry_pick_conflict MergeConflictError

cherry_pick_conflict is returned if there is a conflict when applying the cherry pick.

target_branch_diverged NotAncestorError

target_branch_diverged is returned whenever the tip commit of the branch we're about to apply the new commit on is not a direct ancestor of the newly created cherry-picked commit. This may happen either due to a race where the reference is modified while we compute the cherry-picked commit, or alternatively if the commit fetched from the start branch of the remote repository is not an ancestor of of the local target branch.

changes_already_applied ChangesAlreadyAppliedError

changes_already_applied is returned if the result after applying the cherry pick is empty.

access_check AccessCheckError

access_check is set if the RPC failed due to an external access check.

UserCherryPickRequest

UserCherryPickRequest is a request for the UserCherryPick RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository into which the cherry-pick shall be performed.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

commit GitCommit

commit is the commit to cherry-pick onto the given branch.

branch_name bytes

branch_name is the name of the branch onto which the cherry-pick shall be executed.

message bytes

message is the message to use for the cherry-picked commit.

start_branch_name bytes

start_branch_name is is used in case the branch_name branch does not exist. In that case, it will be created from the start_branch_name.

start_repository Repository

start_repository is used in case the branch_name branch does not exist. In that case, it will be created from start_branch_name in the start_repository.

dry_run bool

dry_run will compute the cherry-pick, but not update the target branch.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the created cherry-picked commit's committer date. If it's not set, the current time will be used.

expected_old_oid string

expected_old_oid is the object ID which branch is expected to point to. This is used as a safety guard to avoid races when branch has been updated meanwhile to point to a different object ID. Only applicable when branch_name is set. If unset, the target branch will be overwritten regardless of its current state. If set, it must either contain a valid, full object ID or the zero object ID in case the branch should be created. Otherwise, this RPC will return an error.

commit_author_name bytes

commit_author_name is the author to be applied to the cherry-picked commit. If not provided, the original commit's author name is used instead.

commit_author_email bytes

commit_author_email is the author email to be applied to the cherry-picked commit. If not provided, the original commit's author email is used instead.

UserCherryPickResponse

UserCherryPickResponse is a response for the UserCherryPick RPC.

FieldTypeLabelDescription
branch_update OperationBranchUpdate

branch_update represents details about the updated branch.

UserCommitFilesAction

UserCommitFilesAction is the request message used to stream in the actions to build a commit.

FieldTypeLabelDescription
header UserCommitFilesActionHeader

header contains the details of action being performed. Header must be sent before the content if content is used by the action.

content bytes

content is the content of the file streamed in one or more messages. Only used with CREATE and UPDATE actions.

UserCommitFilesActionHeader

UserCommitFilesActionHeader contains the details of the action to be performed.

FieldTypeLabelDescription
action UserCommitFilesActionHeader.ActionType

action is the type of the action taken to build a commit. Not all fields are used for all of the actions.

file_path bytes

file_path refers to the file or directory being modified. The meaning differs for each action: 1. CREATE: path of the file to create 2. CREATE_DIR: path of the directory to create 3. UPDATE: path of the file to update 4. MOVE: the new path of the moved file 5. DELETE: path of the file to delete 6. CHMOD: path of the file to modify permissions for

previous_path bytes

previous_path is used in MOVE action to specify the path of the file to move.

base64_content bool

base64_content indicates the content of the file is base64 encoded. The encoding must be the standard base64 encoding defined in RFC 4648. Only used for CREATE and UPDATE actions.

execute_filemode bool

execute_filemode determines whether the file is created with execute permissions. The field is only used in CREATE and CHMOD actions.

infer_content bool

infer_content should be set to true for move actions that change the file path, but not its content. It should be set instead of populating the content field. Ignored for other action types.

UserCommitFilesError

UserCommitFilesError is an error returned by the UserCommitFiles RPC in some specific well

defined error cases.

FieldTypeLabelDescription
access_check AccessCheckError

access_check is set if the RPC failed due to an external access check.

index_update IndexError

index_update is set to the error message when an operation conflicts with the repository index, such as creating a file that already exists.

custom_hook CustomHookError

custom_hook is set if any custom hook which has running as part of this RPC call has returned a non-zero exit code.

UserCommitFilesRequest

UserCommitFilesRequest is the request of UserCommitFiles.

FieldTypeLabelDescription
header UserCommitFilesRequestHeader

header defines the details of where to commit, the details and which commit to use as the parent. header must always be sent as the first request of the stream.

action UserCommitFilesAction

action contains an action to build a commit. There can be multiple actions per stream.

UserCommitFilesRequestHeader

UserCommitFilesRequestHeader is the header of the UserCommitFiles that defines the commit details,

parent and other information related to the call.

FieldTypeLabelDescription
repository Repository

repository is the target repository where to apply the commit.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

branch_name bytes

branch_name is the name of the branch to point to the new commit. If start_sha and start_branch_name are not defined, the commit of branch_name is used as the parent commit.

commit_message bytes

commit_message is the message to use in the commit.

commit_author_name bytes

commit_author_name is the commit author's name. If not provided, the user's name is used instead.

commit_author_email bytes

commit_author_email is the commit author's email. If not provided, the user's email is used instead.

start_branch_name bytes

start_branch_name specifies the branch whose commit to use as the parent commit. Takes priority over branch_name. Optional.

start_repository Repository

start_repository specifies which contains the parent commit. If not specified, repository itself is used to look up the parent commit. Optional.

force bool

force determines whether to force update the target branch specified by branch_name to point to the new commit.

start_sha string

start_sha specifies the SHA of the commit to use as the parent of new commit. Takes priority over start_branch_name and branch_name. Optional.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the commits as author and committer date. If it's not set, the current time will be used.

expected_old_oid string

expected_old_oid is the object ID which branch is expected to point to. This is used as a safety guard to avoid races when branch has been updated meanwhile to point to a different object ID. Only applicable when branch_name is set. If unset, the target branch will be overwritten regardless of its current state. If set, it must either contain a valid, full object ID or the zero object ID in case the branch should be created. Otherwise, this RPC will return an error.

sign bool

sign controls whether a commit created by Gitaly must be signed using a signing key configured system-wide.

UserCommitFilesResponse

UserCommitFilesResponse is the response object of UserCommitFiles.

FieldTypeLabelDescription
branch_update OperationBranchUpdate

branch_update contains the details of the commit and the branch update.

index_error string

index_error is set to the error message when an invalid action was attempted, such as trying to create a file that already existed.

pre_receive_error string

pre_receive_error is set when the pre-receive hook errored.

UserCreateBranchError

UserCreateBranchError is an error returned by the UserCreateBranch RPC in some specific well

defined error cases.

FieldTypeLabelDescription
custom_hook CustomHookError

custom_hookError is set if any custom hook which has running as part of this RPC call has returned a non-zero exit code.

UserCreateBranchRequest

UserCreateBranchRequest is a request for the UserCreateBranch RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which the branch should be created.

branch_name bytes

branch_name is the name of the branch to create.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

start_point bytes

start_point is the Git revision to start the branch at. See the gitrevisions(1) man pages for supported syntax.

UserCreateBranchResponse

UserCreateBranchResponse is a response for the UserCreateBranch RPC.

FieldTypeLabelDescription
branch Branch

branch is the branch that was created.

UserCreateTagError

UserCreateTagError includes error descriptions which may be set as error details in case

userCreateTag fails.

FieldTypeLabelDescription
access_check AccessCheckError

access_check is set if the RPC failed due to an external access check.

reference_update ReferenceUpdateError

reference_updateError is set if the RPC failed because updating the reference to the new object ID has failed.

custom_hook CustomHookError

custom_hook is set if any custom hook which has running as part of this RPC call has returned a non-zero exit code.

reference_exists ReferenceExistsError

reference_existsError is set if the tag reference exists already.

UserCreateTagRequest

UserCreateTagRequest is a request for the UserCreateTag RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which the tag shall be created.

tag_name bytes

tag_name is the name of the tag that shall be created. Note that this should be set to the name only: if you want to create a tag `refs/heads/v1.0`, you need to pass `v1.0` as TagName.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

target_revision bytes

target_revision is the revision that the newly created tag should be pointing to. Note that if the revision points to a tag, that tag will be peeled to the commit it is pointing to. If the target_revision does not point to a commit then the RPC will return an error.

message bytes

message is the message of the tag. If it is empty, a lightweight tag is created. Otherwise, an annotated tag is created.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the created tag tags. If it's not set, the current time will be used. It's only used if an annotated tag is being created.

UserCreateTagResponse

UserCreateTagResponse is a response for the UserCreateTag RPC.

FieldTypeLabelDescription
tag Tag

tag is the newly created tag.

UserDeleteBranchError

UserDeleteBranchError is an error returned by the UserDeleteBranch RPC in some specific well

defined error cases.

FieldTypeLabelDescription
access_check AccessCheckError

access_check is set if the RPC failed due to an external access check.

reference_update ReferenceUpdateError

reference_updateError is set if the RPC failed because updating the reference to the new object ID has failed.

custom_hook CustomHookError

custom_hook is set if any custom hook which has running as part of this RPC call has returned a non-zero exit code.

UserDeleteBranchRequest

UserDeleteBranchRequest is a request for the UserDeleteBranch RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to delete the branch in.

branch_name bytes

branch_name is the name of the branch that shall be deleted. This is expected to be the branch name only, e.g. in case you want to delete `refs/heads/main` the request needs to only contain `main` as the branch name.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

expected_old_oid string

expected_old_oid is the object ID which branch is expected to point to. This is used as a safety guard to avoid races when branch has been updated meanwhile to point to a different object ID. If unset, the target branch will be deleted regardless of its current state. If set, it must contain a valid, full object ID. Otherwise, this RPC will return an error.

UserDeleteBranchResponse

UserDeleteBranchResponse is a response for the UserDeleteBranch RPC.

UserDeleteTagRequest

UserDeleteTagRequest is a request for the UserDeleteTag RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository from which the tag should be deleted.

tag_name bytes

tag_name is the name of the tag to delete.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

expected_old_oid string

expected_old_oid is the object ID which tag is expected to point to. This is used as a safety guard to avoid races when tag has been updated meanwhile to point to a different object ID. If unset, the target tag will be deleted regardless of its current state. If set, it must contain a valid, full object ID. Otherwise, this RPC will return an error.

UserDeleteTagResponse

UserDeleteTagResponse is a response for the UserDeleteTag RPC.

FieldTypeLabelDescription
pre_receive_error string

pre_receive_error indicates an error that occurred while executing custom hooks.

UserFFBranchError

UserFFBranchError is an error returned by the UserFFBranch RPC in some specific well

defined error cases.

FieldTypeLabelDescription
custom_hook CustomHookError

custom_hook is set if any custom hook which was running as part of this RPC call has returned a non-zero exit code.

reference_update ReferenceUpdateError

reference_update is set if the RPC failed because updating the reference to the new object ID has failed.

UserFFBranchRequest

UserFFBranchRequest is a request for the UserFFBranch RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository for which to perform the fast-forward merge.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

commit_id string

commit_id is the commit ID to fast-forward the branch to.

branch bytes

branch is the name of the branch to fast-forward. This must be the branch name only and not a fully qualified reference, e.g. "master" instead of "refs/heads/master".

expected_old_oid string

expected_old_oid is the object ID which branch is expected to point to. This is used as a safety guard to avoid races when branch has been updated meanwhile to point to a different object ID. If unset, the target branch will be overwritten regardless of its current state. If set, it must either contain a valid, full object ID or the zero object ID in case the branch should be created. Otherwise, this RPC will return an error.

UserFFBranchResponse

UserFFBranchResponse is a response for the UserFFBranch RPC.

FieldTypeLabelDescription
branch_update OperationBranchUpdate

branch_update contains details of the fast-forwarded branch.

pre_receive_error string

pre_receive_error is set in the case of an `Internal` error and contains details of the failed custom hook.

UserMergeBranchError

UserMergeBranchError includes error descriptions which may be set as error

details in case UserMergeBranch fails.

FieldTypeLabelDescription
access_check AccessCheckError

access_check is set if the RPC failed due to an external access check.

reference_update ReferenceUpdateError

reference_updateError is set if the RPC failed because updating the reference to the new object ID has failed.

custom_hook CustomHookError

custom_hook is set if any custom hook which has running as part of this RPC call has returned a non-zero exit code.

merge_conflict MergeConflictError

merge_conflictError is set if merging the revisions has resulted in conflicting files.

UserMergeBranchRequest

UserMergeBranchRequest is a request for the UserMergeBranch RPC.

All mandatory parameters except for `apply` should be set in the first

message.

FieldTypeLabelDescription
repository Repository

repository is the repository to compute the merge for.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

commit_id string

commit_id is the object ID (hash) of the object that shall be merged into the target branch.

branch bytes

branch is the branch into which the given commit shall be merged and whose reference is going to be updated.

message bytes

message is the message to use for the merge commit.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the merge commit. If it's not set, the current time will be used.

expected_old_oid string

expected_old_oid is the object ID which branch is expected to point to. This is used as a safety guard to avoid races when branch has been updated meanwhile to point to a different object ID. If unset, the target branch will be overwritten regardless of its current state. If set, it must either contain a valid, full object ID or the zero object ID in case the branch should be created. Otherwise, this RPC will return an error.

squash bool

squash is a flag to indicate that `commit_id` is a squash commit. When set to `true`, it merges only the squash commit without creating the merge commit.

apply bool

apply is used in the second message. Setting it to true will proceed with the merge. Setting it to false will abort the merge.

UserMergeBranchResponse

UserMergeBranchResponse is a response for the UserMergeBranch RPC.

FieldTypeLabelDescription
commit_id string

commit_id is the merge commit the branch will be updated to. This is sent as the response to the first request.

branch_update OperationBranchUpdate

branch_update contains the commit ID of the merge commit if the merge has been applied to the branch. This is sent as the response to the second request.

UserMergeToRefRequest

UserMergeToRefRequest is a request for the UserMergeToRef RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which the merge shall be computed.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

source_sha string

source_sha is the object ID of the second parent of the computed merge.

branch bytes

Deprecated. branch contains the name of the branch which should be used as the first parent of the computed merge. It is deprecated in favor of `first_parent_ref` and will be ignored in case it is set.

target_ref bytes

target_ref contains the fully qualified reference which should be updated with the computed merge commit.

message bytes

message is the message to use for the merge commit.

first_parent_ref bytes

first_parent_ref is the name of the reference which should be used as the first parent of the computed merge. Overrides `branch`.

allow_conflicts bool

Deprecated. allow_conflicts if set, used to allow the merge to go ahead when there were conflicts. The code would simply write the conflict markers in the code. This has since been deprecated in Rails and is no longer needed.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the merge commit. If it's not set, the current time will be used.

expected_old_oid string

expected_old_oid is the object ID that is expected to be at target_ref. It is used as an optimistic lock on concurrent updates of target_ref: If target_ref no longer points to this ID, then the update is rejected. expected_old_oid is the object ID which branch is expected to point to. This is used as a safety guard to avoid races when branch has been updated meanwhile to point to a different object ID. If unset, the target branch will be overwritten regardless of its current state. If set, it must either contain a valid, full object ID or the zero object ID in case the branch should be created. Otherwise, this RPC will return an error.

Fields with deprecated option

Name Option
branch

true

allow_conflicts

true

UserMergeToRefResponse

UserMergeToRefResponse is a response for the UserMergeToRef RPC.

FieldTypeLabelDescription
commit_id string

commit_id is the object ID of the computed merge commit.

UserRebaseConfirmableError

UserRebaseConfirmableError is a structured error for the UserRebaseConfirmable RPC.

FieldTypeLabelDescription
rebase_conflict MergeConflictError

rebase_conflict is returned in case rebasing commits on top of the start commit fails with a merge conflict and in case merge squashing commits fails with a merge conflict.

access_check AccessCheckError

access_check is set if the RPC failed due to an external access check.

UserRebaseConfirmableRequest

UserRebaseConfirmableRequest is a request for the UserRebaseConfirmable RPC.

FieldTypeLabelDescription
header UserRebaseConfirmableRequest.Header

header must be the first request for each request stream containing details about the rebase to perform.

apply bool

apply is the second request that must be made to confirm that the rebase should be applied to the branch.

UserRebaseConfirmableRequest.Header

Header contains information to compute the rebase and must be sent as

first message.

FieldTypeLabelDescription
repository Repository

repository is the repository in which the rebase will be computed and applied.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

rebase_id string

Deprecated. rebase_id does nothing anymore.

branch bytes

branch is the branch onto which the rebase shall happen.

branch_sha string

branch_sha is the expected object ID which branch currently points to. This is used as a safety guard to avoid races when branch has been updated meanwhile.

remote_repository Repository

remote_repository is the repository which contains the branch which shall be rebased onto the local branch.

remote_branch bytes

remote_branch contains the branch name which shall re rebased onto the local branch.

git_push_options string repeated

git_push_options contain options which shall be passed to the git hooks when the local branch gets updated.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the rebased commits as committer date. If it's not set, the current time will be used.

Fields with deprecated option

Name Option
rebase_id

true

UserRebaseConfirmableResponse

UserRebaseConfirmableResponse is a response for the UserRebaseConfirmable RPC.

FieldTypeLabelDescription
rebase_sha string

rebase_sha is the commit the branch will be updated to, it will be present in the first response. The caller can still abort the rebase.

rebase_applied bool

rebase_applied confirms that the rebase has been applied to the branch. It is present in the second response.

UserRebaseToRefRequest

UserRebaseToRefRequest contains the request parameters for the UserRebaseToRef RPC

FieldTypeLabelDescription
repository Repository

repository is the repository in which the rebase shall be computed.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

source_sha string

source_sha is the object ID of the commit to be rebased.

target_ref bytes

target_ref is the fully qualified reference that will be overwritten or created with the rebased commits.

first_parent_ref bytes

first_parent_ref is the name of the reference on top of which SourceSha should be rebased.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the rebased commits as committer date. If it's not set, the current time will be used.

expected_old_oid string

expected_old_oid is the object ID to which TargetRef is expected to point. This is used as a safety guard to avoid races when TargetRef has been updated meanwhile to point to a different object ID. If unset, TargetRef will be overwritten regardless of its current state. If set, it must either contain a valid, full object ID or the zero object ID in case the ref should be created. Otherwise, this RPC will return an error.

UserRebaseToRefResponse

UserRebaseToRefResponse contains the response data for the UserRebaseToRef RPC

FieldTypeLabelDescription
commit_id string

commit_id is the object ID of the HEAD of the rebased ref.

UserRevertError

UserRevertError is an error returned by the UserRevert RPC.

FieldTypeLabelDescription
merge_conflict MergeConflictError

merge_conflict is returned if there is a conflict when applying the revert.

changes_already_applied ChangesAlreadyAppliedError

changes_already_applied is returned if the result after applying the revert is empty.

custom_hook CustomHookError

custom_hook contains the error message if the pre-receive hook failed.

not_ancestor NotAncestorError

not_ancestor is returned if the old tip of the target branch is not an ancestor of the new commit.

UserRevertRequest

UserRevertRequest is a request for the UserRevert RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which the revert shall be applied.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

commit GitCommit

commit is the commit to revert. Only the `id` field is required.

branch_name bytes

branch_name is the name of the branch onto which the reverted commit shall be committed.

message bytes

message is the message to use for the revert commit.

start_branch_name bytes

start_branch_name is is used in case the branch_name branch does not exist. In that case, it will be created from the start_branch_name.

start_repository Repository

start_repository is used in case the branch_name branch does not exist. In that case, it will be created from start_branch_name in the start_repository.

dry_run bool

dry_run will compute the revert, but not update the target branch.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the created cherry-picked commit's committer date. If it's not set, the current time will be used.

expected_old_oid string

expected_old_oid is the object ID which branch is expected to point to. This is used as a safety guard to avoid races when branch has been updated meanwhile to point to a different object ID. Only applicable when branch_name is set. If unset, the target branch will be overwritten regardless of its current state. If set, it must either contain a valid, full object ID or the zero object ID in case the branch should be created. Otherwise, this RPC will return an error.

UserRevertResponse

UserRevertResponse is a response for the UserRevert RPC.

FieldTypeLabelDescription
branch_update OperationBranchUpdate

branch_update represents details about the updated branch.

create_tree_error string

create_tree_error contains the error message if creation of the tree failed.

commit_error string

commit_error contains the error message if updating the reference failed.

pre_receive_error string

pre_receive_error contains the error message if the pre-receive hook failed.

create_tree_error_code UserRevertResponse.CreateTreeError

create_tree_error_code contains the error code if creation of the tree failed.

UserSquashError

UserSquashError is an error that may be returned when the UserSquash RPC

fails.

FieldTypeLabelDescription
resolve_revision ResolveRevisionError

resolve_revision is returned in case resolving either the start or end revision has failed.

rebase_conflict MergeConflictError

rebase_conflict is returned in case rebasing commits on top of the start commit fails with a merge conflict.

UserSquashRequest

UserSquashRequest is a request for the UserSquash RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository into which the squashed commit shall be written.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

start_sha string

start_sha is the object ID of the start commit of the range which shall be squashed. Must be an ancestor of end_sha.

end_sha string

end_sha is the object ID of the end commit of the range which shall be squashed.

author User

author will be used as the author of the squashed commit.

commit_message bytes

commit_message is the message to be used for the squashed commit.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the squashed commit as committer date. If it's not set, the current time will be used.

UserSquashResponse

UserSquashResponse is a response for the UserSquash RPC.

FieldTypeLabelDescription
squash_sha string

squash_sha is the object ID of the squashed commit.

UserUpdateBranchRequest

UserUpdateBranchRequest is a request for the UserUpdateBranch RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to update the branch in.

branch_name bytes

branch_name is the name of the branch to update.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

newrev bytes

newrev is the Git revision which the branch will point to.

oldrev bytes

oldrev is the Git revision which the branch currently points to.

UserUpdateBranchResponse

UserUpdateBranchResponse is a response for the UserUpdateBranch RPC.

FieldTypeLabelDescription
pre_receive_error string

pre_receive_error indicates an error that occurred while executing custom hooks.

UserUpdateSubmoduleRequest

UserUpdateSubmoduleRequest is a request for the UserUpdateSubmodule RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which the submodule shall be updated.

user User

user to execute the action as. Also used to perform authentication and authorization via an external endpoint.

commit_sha string

commit_sha is the object ID the submodule shall be updated to.

branch bytes

branch is the branch which shall be updated. This is the unqualified name of the branch, it must not have a "refs/heads/" prefix.

submodule bytes

submodule is the path to the submodule which shall be updated.

commit_message bytes

commit_message is the message updating the submodule.

timestamp google.protobuf.Timestamp

timestamp is the optional timestamp to use for the commit updating the submodule as committer date. If it's not set, the current time will be used.

expected_old_oid string

expected_old_oid is the object ID which branch is expected to point to. This is used as a safety guard to avoid races when branch has been updated meanwhile to point to a different object ID. If unset, the target branch will be overwritten regardless of its current state. If set, it must either contain a valid, full object ID or the zero object ID in case the branch should be created. Otherwise, this RPC will return an error.

UserUpdateSubmoduleResponse

UserUpdateSubmoduleResponse is a response for the UserUpdateSubmodule RPC.

FieldTypeLabelDescription
branch_update OperationBranchUpdate

branch_update contains information about the updated branch.

pre_receive_error string

pre_receive_error contains an error message if the pre-receive hook rejects the update.

commit_error string

commit_error contains an error message if committing the update fails.

UserCommitFilesActionHeader.ActionType

ActionType is the type of action to perform.

NameNumberDescription
CREATE 0

CREATE creates a new file. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

CREATE_DIR 1

CREATE_DIR creates a new directory. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

UPDATE 2

UPDATE updates an existing file. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

MOVE 3

MOVE moves an existing file to a new path. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

DELETE 4

DELETE deletes an existing file. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

CHMOD 5

CHMOD changes the permissions of an existing file. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

UserRevertResponse.CreateTreeError

CreateTreeError represents an error which happened when computing the

revert.

NameNumberDescription
NONE 0

NONE denotes that no error occurred. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

EMPTY 1

EMPTY denotes that the revert would've resulted in an empty commit, typically because it has already been applied to the target branch. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

CONFLICT 2

CONFLICT denotes that the revert resulted in a conflict. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

OperationService

OperationService provides an interface for performing mutating git

operations on a repository on behalf of a user. The user's operation is

treated as untrusted. Any reference update is thus checked against GitLab's

'/allowed' endpoint.

Method NameRequest TypeResponse TypeDescription
UserCreateBranch UserCreateBranchRequest UserCreateBranchResponse

UserCreateBranch creates a single branch in the context of a specific user. It executes hooks and contacts Rails to verify that the user is allowed to create the branch. The following known error conditions may happen: - `FailedPrecondition` if the Git revision provided in start_point can't be found or updated. - `InvalidArgument` if the commit ID resolved from the start_point can't be parsed. - `PermissionDenied` with an embedded `UserCreateBranchError` if any custom hooks return a non-zero exit code.

UserUpdateBranch UserUpdateBranchRequest UserUpdateBranchResponse

UserUpdateBranch updates a branch to point to a new revision. It executes hooks and contacts Rails to verify that the user is allowed to update the branch. The following known error conditions may happen: - `InvalidArgument` if any of the request fields can't be validated. - `Internal` if the newrev or oldrev are invalid in the context of the repository. - `UserUpdateBranchResponse` with the `PreReceiveError` field set, if any custom hooks return a non-zero exit code.

UserDeleteBranch UserDeleteBranchRequest UserDeleteBranchResponse

UserDeleteBranch force-deletes a single branch in the context of a specific user. It executes hooks and contacts Rails to verify that the user is indeed allowed to delete that branch. The following known error conditions may happen: - Returns `InvalidArgument` in case either the branch name or user are not set. - Returns `FailedPrecondition` in case the branch does not exist. - Returns `OK` with a `PreReceiveError` in case custom hooks refused the update. If the `gitaly_user_delete_branch_structured_errors` feature flag is enabled this error case will instead return `PermissionDenied` with either a `CustomHook` or AccessCheck` structured error. - Returns `FailedPrecondition` in case updating the reference fails because of a concurrent write to the same reference. If the `gitaly_user_delete_branch_structured_errors` feature flag is set this error case will instead return `FailedPrecondition` with a `ReferenceUpdate` structured error.

UserCreateTag UserCreateTagRequest UserCreateTagResponse

UserCreateTag creates a new tag. This RPC knows to create both lightweight and annotated tags depending on whether a message is set.

UserDeleteTag UserDeleteTagRequest UserDeleteTagResponse

UserDeleteTag deletes an existing tag. It executes hooks and contacts Rails to verify that the user is allowed to delete the tag. The following known error conditions may happen: - `InvalidArgument` if the repository, tag_name, user, or expected_old_oid (if provided) are invalid. - `FailedPrecondition` if the tag_name can't be found, or the ref couldn't be deleted due to a concurrent write to the same ref. - `Internal` if the tag_name can't be resolved or an unknown error occurs.

UserMergeToRef UserMergeToRefRequest UserMergeToRefResponse

UserMergeToRef creates a merge commit and updates target_ref to point to that new commit. The first parent of the merge commit (the main line) is taken from first_parent_ref. The second parent is specified by its commit ID in source_sha. If target_ref already exists it will be overwritten.

UserRebaseToRef UserRebaseToRefRequest UserRebaseToRefResponse

UserRebaseToRef rebases source_sha on top of first_parent_ref and updates target_ref to point to that new commit. If target_ref already exists, then it will be overwritten. This operation is intended to be used on internal refs (e.g. refs/merge-requests/*) and does not call hooks.

UserMergeBranch UserMergeBranchRequest stream UserMergeBranchResponse stream

UserMergeBranch tries to merge the given commit into the target branch. The merge commit is created with the given user as author/committer and the given message. This is a two-stage RPC that requires confirmation to make user-visible changes to the repository: - The first request contains details about the requested merge, which will result in a response with the created merge commit ID. - The second request should set `apply = true` to apply the merge. After the second request, it executes hooks and contacts Rails to verify that the user is allowed to update the branch. The following known error conditions may happen: - `InvalidArgument` if request fields can't be validated or resolved. - `NotFound` if the branch can't be found. - `FailedPrecondition` if there are merge conflicts, if the merge is aborted by setting `apply = false` in the second request, or if the merge fails due to a concurrent write to the same ref. - `PermissionDenied` if the user doesn't have permissions to merge a branch.

UserFFBranch UserFFBranchRequest UserFFBranchResponse

UserFFBranch tries to perform a fast-forward merge of a given commit into the given branch. If the merge is not a fast-forward merge, the request will fail. The RPC will return an empty response in case updating the reference fails e.g. because of a race.

UserCherryPick UserCherryPickRequest UserCherryPickResponse

UserCherryPick tries to perform a cherry-pick of a given commit onto a branch.

UserCommitFiles UserCommitFilesRequest stream UserCommitFilesResponse

UserCommitFiles builds a commit from a stream of actions and updates the target branch to point to it. userCommitFilesRequest with a UserCommitFilesRequestHeader must be sent as the first message of the stream. Following that, a variable number of actions can be sent to build a new commit. Each action consists of a header followed by content if used by the action.

UserRebaseConfirmable UserRebaseConfirmableRequest stream UserRebaseConfirmableResponse stream

UserRebaseConfirmable rebases the given remote branch onto a target branch. The remote branch may be part of another repository. This RPC requires confirmation to make any user-visible changes to the repository. The first request sent shall contains details about the requested rebase, which will result in a response with the created rebase commit ID. Only if a second message with `apply = true` is sent will the rebase be applied.

UserRevert UserRevertRequest UserRevertResponse

UserRevert tries to perform a revert of a given commit onto a branch.

UserSquash UserSquashRequest UserSquashResponse

UserSquash squashes a range of commits into a single commit. If successful, it returns the object ID of the newly created squash commit. On error, it returns a gRPC error. Some specific errors will have an embedded UserSquashError such that clients can deduce what exactly has failed.

UserApplyPatch UserApplyPatchRequest stream UserApplyPatchResponse

UserApplyPatch applies patches to a given branch.

UserUpdateSubmodule UserUpdateSubmoduleRequest UserUpdateSubmoduleResponse

UserUpdateSubmodule updates a submodule to point to a new commit.

packfile.proto

Top

PackfileNegotiationStatistics

PackfileNegotiationStatistics represents the git packfile negotiation.

FieldTypeLabelDescription
payload_size int64

payload_size is the total size of all pktlines' payload in bytes. This excludes the pktline prefix.

packets int64

packets is the total number of packets.

caps string repeated

caps is the capabilities announced by the client.

wants int64

wants is the number of objects the client announced it wants.

haves int64

haves is the number of objects the client announced it has.

shallows int64

shallows is the number of shallow boundaries announced by the client.

deepen string

deepen is one of "deepen <depth>", "deepen-since <timestamp>", "deepen-not <ref>". [deepen <depth>|deepen-since <timestamp>|deepen-not <ref>]

filter string

filter is specified by the client.

partition.proto

Top

BackupPartitionRequest

BackupPartitionRequest is a request for the BackupPartition RPC.

FieldTypeLabelDescription
storage_name string

storage_name is the name of the storage containing the partition to be backed up.

partition_id string

partition_id is the identifier of the specific partition within the storage to be backed up, which may contain one or more repositories and associated data.

BackupPartitionResponse

BackupPartitionResponse is a response for the BackupPartition RPC.

KVPair

KVPair represents single key-value pair.

FieldTypeLabelDescription
key bytes

key is the key of the key-value pair.

value bytes

value is the value of the key-value pair.

ListPartitionsRequest

ListPartitionsRequest is a request for the ListPartitions RPC.

FieldTypeLabelDescription
storage_name string

storage_name is the name of the storage in which partitions will be searched for.

pagination_params PaginationParameter

pagination_params controls paging. Refer to PaginationParameter documentation for further info.

ListPartitionsResponse

ListPartitionsResponse is a response for the ListPartitions RPC.

FieldTypeLabelDescription
partitions Partition repeated

partitions is the list of partitions found.

pagination_cursor PaginationCursor

pagination_cursor contains the page token to fetch the next page of results. Refer to PaginationCursor documentation for further info.

PartitionService

PartitionService is a service providing RPCs accessing partitions as a whole.

Method NameRequest TypeResponse TypeDescription
BackupPartition BackupPartitionRequest BackupPartitionResponse

BackupPartition backs up an entire partition and saves it to the configured backup sink (filesystem or object storage).

ListPartitions ListPartitionsRequest ListPartitionsResponse

ListPartitions lists partitions present in the storage.

praefect.proto

Top

DatalossRequest

DatalossRequest is the request for data loss information

FieldTypeLabelDescription
virtual_storage string

virtual_storage is the virtual storage to get dataloss information for.

include_partially_replicated bool

include_partially_replicated indicates whether to include repositories which are available but are unavailable on some assigned storages.

DatalossResponse

DatalossResponse contains information about a repository that may be behind

the primary.

FieldTypeLabelDescription
repositories DatalossResponse.Repository repeated

repositories with data loss

DatalossResponse.Repository

Repository is the status of a repository

FieldTypeLabelDescription
relative_path string

relative_path of the repository with outdated replicas

storages DatalossResponse.Repository.Storage repeated

storages on which the repository is outdated

unavailable bool

unavailable indicates whether the repository is in unavailable.

primary string

primary is the current primary storage of the repository.

DatalossResponse.Repository.Storage

Storage ...

FieldTypeLabelDescription
name string

name of the storage

behind_by int64

behind_by indicates how many generations this storage is behind.

assigned bool

assigned indicates whether the storage is assigned to host the repository.

healthy bool

healthy indicates whether the storage is considered healthy by the consensus of Praefect nodes.

valid_primary bool

valid_primary indicates whether the storage is ready to act as the primary if necessary.

GetRepositoryMetadataRequest

GetRepositoryMetadataRequest specifies the repository to retrieve metadata for.

FieldTypeLabelDescription
repository_id int64

repository_id is the ID of the repository to retrieve information for.

path GetRepositoryMetadataRequest.Path

path is the external path of the repository to retrieve information for.

GetRepositoryMetadataRequest.Path

Path ...

FieldTypeLabelDescription
virtual_storage string

virtual_storage is the virtual storage where the repository is.

relative_path string

relative_path is the relative path of the repository in the virtual storage.

GetRepositoryMetadataResponse

GetRepositoryMetadataResponse contains the repository's cluster metadata.

FieldTypeLabelDescription
repository_id int64

repository_id is the internal ID of the repository.

virtual_storage string

virtual_storage is the virtual storage in which the repository is located.

relative_path string

relative_path is the relative path of the repository in the virtual storage.

replica_path string

replica_path is the path on the disk where the replicas are stored.

primary string

primary is the current primary of the repository.

generation int64

generation is the repository's current generation.

replicas GetRepositoryMetadataResponse.Replica repeated

replicas are the existing and supposed to exist replicas of this repository.

GetRepositoryMetadataResponse.Replica

Replica ...

FieldTypeLabelDescription
storage string

storage is the name of the replica's storage.

assigned bool

assigned indicates whether the replica is on an assigned storage.

generation int64

generation is the replicas confirmed generation. Generation is -1 if the replica does not yet exist.

healthy bool

healthy indicates whether the replica is on a healthy storage.

valid_primary bool

valid_primary indicates whether the replica is considered a valid primary.

verified_at google.protobuf.Timestamp

verified_at is the last successful verification time of the replica.

MarkUnverifiedRequest

MarkUnverifiedRequest specifies the replicas which to mark unverified.

FieldTypeLabelDescription
repository_id int64

repository_id is the id of a repository to mark all replicas for unverified.

virtual_storage string

virtual_storage is the name of virtual storage which will have all of its replicas marked unverified.

storage MarkUnverifiedRequest.Storage

storage specifies a single storage. The replicas on the storage marked unverified.

MarkUnverifiedRequest.Storage

Storage identifies a single storage in a virtual storage.

FieldTypeLabelDescription
virtual_storage string

virtual_storage is the virtual storage the storage is part of.

storage string

storage is the name of the storage.

MarkUnverifiedResponse

MarkUnverifiedResponse returns the number of replicas marked unverified.

FieldTypeLabelDescription
replicas_marked int64

replicas_marked indicates the number of replicas that were marked unverified.

RepositoryReplicasRequest

RepositoryReplicasRequest ...

FieldTypeLabelDescription
repository Repository

repository ...

RepositoryReplicasResponse

RepositoryReplicasResponse ...

FieldTypeLabelDescription
primary RepositoryReplicasResponse.RepositoryDetails

primary ...

replicas RepositoryReplicasResponse.RepositoryDetails repeated

replicas ...

RepositoryReplicasResponse.RepositoryDetails

RepositoryDetails ...

FieldTypeLabelDescription
repository Repository

repository ...

checksum string

checksum ...

SetAuthoritativeStorageRequest

SetAuthoritativeStorageRequest ...

FieldTypeLabelDescription
virtual_storage string

virtual_storage ...

relative_path string

relative_path ...

authoritative_storage string

authoritative_storage ...

SetAuthoritativeStorageResponse

SetAuthoritativeStorageResponse ...

SetReplicationFactorRequest

SetReplicationFactorRequest sets the desired replication factor for a repository.

FieldTypeLabelDescription
virtual_storage string

virtual_storage is the virtual storage the repository is located in

relative_path string

relative_path is the relative path of the repository

replication_factor int32

replication_factor is the desired replication factor. Replication must be equal or greater than 1.

SetReplicationFactorResponse

SetReplicationFactorResponse returns the assigned hosts after setting the desired replication factor.

FieldTypeLabelDescription
storages string repeated

storages are the storages assigned to host the repository.

PraefectInfoService

PraefectInfoService is a service which provides RPCs to query and modify

Praefect-specific parameters.

Method NameRequest TypeResponse TypeDescription
RepositoryReplicas RepositoryReplicasRequest RepositoryReplicasResponse

RepositoryReplicas ...

Dataloss DatalossRequest DatalossResponse stream

Dataloss provides information on repositories in Praefect that are in a degraded state and thus susceptible to dataloss. A repository is considered degraded when its replicas are outdated and/or unavailable.

SetAuthoritativeStorage SetAuthoritativeStorageRequest SetAuthoritativeStorageResponse

SetAuthoritativeStorage sets the authoritative storage for a repository on a given virtual storage. This causes the current version of the repository on the authoritative storage to be considered the latest and overwrite any other version on the virtual storage.

MarkUnverified MarkUnverifiedRequest MarkUnverifiedResponse

MarkUnverified marks replicas as unverified. This will trigger verification as Praefect's metadata verifier prioritizes unverified replicas.

SetReplicationFactor SetReplicationFactorRequest SetReplicationFactorResponse

SetReplicationFactor assigns or unassigns host nodes from the repository to meet the desired replication factor. SetReplicationFactor returns an error when trying to set a replication factor that exceeds the storage node count in the virtual storage. An error is also returned when trying to set a replication factor below one. The primary node won't be unassigned as it needs a copy of the repository to accept writes. Likewise, the primary is the first storage that gets assigned when setting a replication factor for a repository. Assignments of unconfigured storages are ignored. This might cause the actual replication factor to be higher than desired if the replication factor is set during an upgrade from a Praefect node that does not yet know about a new node. As assignments of unconfigured storages are ignored, replication factor of repositories assigned to a storage node removed from the cluster is effectively decreased.

GetRepositoryMetadata GetRepositoryMetadataRequest GetRepositoryMetadataResponse

GetRepositoryMetadata returns the cluster metadata for a repository. Returns NotFound if the repository does not exist.

ref.proto

Top

DeleteRefsError

DeleteRefsError is returned when DeleteRefs fails to delete refs

FieldTypeLabelDescription
invalid_format InvalidRefFormatError

invalid_format is returned when one or more of the refs to be deleted have an invalid format.

references_locked ReferencesLockedError

references_locked is returned when the references to be deleted are already locked by another process.

DeleteRefsRequest

DeleteRefsRequest is a request for the DeleteRefs RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository that reference is deleted from.

except_with_prefix bytes repeated

except_with_prefix is the prefix used to determine which references to exclude from being deleted. This field can not be set in combination with the refs field. If the refs field is not set, except_with_prefix must contain at least one prefix as deleting all references in not allowed. protolint:disable:this REPEATED_FIELD_NAMES_PLURALIZED

refs bytes repeated

refs is the list of references to be deleted. This field can not be set in combination with except_with_prefix and cannot be empty if except_with_prefix is also empty.

DeleteRefsResponse

DeleteRefsResponse is a response for the DeleteRefs RPC.

FieldTypeLabelDescription
git_error string

git_error is a Git error returned by the RPC. Is empty if no error occurs.

FindAllBranchesRequest

FindAllBranchesRequest is a request for the FindAllBranches RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to find the branch in.

merged_only bool

merged_only if set, will only return branches that are merged into root ref.

merged_branches bytes repeated

merged_branches is the list of branches from which we return those merged into the root ref. Used only when merged_only is set to true.

FindAllBranchesResponse

FindAllBranchesResponse is a response for the FindAllBranches RPC.

FieldTypeLabelDescription
branches FindAllBranchesResponse.Branch repeated

branches is a list of branches found in the repository.

FindAllBranchesResponse.Branch

Branch is a branch found in the repository.

FieldTypeLabelDescription
name bytes

name is the name of the branch.

target GitCommit

target is the commit referenced by the branch.

FindAllRemoteBranchesRequest

FindAllRemoteBranchesRequest is a request for the FindAllRemoteBranches RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to find remote branches from.

remote_name string

remote_name is the name of the remote repository.

FindAllRemoteBranchesResponse

FindAllRemoteBranchesResponse is a request for the FindAllRemoteBranches RPC.

FieldTypeLabelDescription
branches Branch repeated

branches contains a list of found remote branches.

FindAllTagsRequest

FindAllTagsRequest is a request for the FindAllTags RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to look up the tags in.

sort_by FindAllTagsRequest.SortBy

sort_by allows to request tags in particular order.

pagination_params PaginationParameter

pagination_params controls paging. Refer to PaginationParameter documentation for further info.

FindAllTagsRequest.SortBy

SortBy allows to specify desired order of the elements.

FieldTypeLabelDescription
key FindAllTagsRequest.SortBy.Key

key is the key that tags are sorted by.

direction SortDirection

direction is the direction that tags should be sorted in.

FindAllTagsResponse

FindAllTagsResponse is a response for the FindAllTags RPC.

FieldTypeLabelDescription
tags Tag repeated

tags is a list of the found tags.

FindBranchRequest

FindBranchRequest is a request for the FindBranch RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which the branch should be looked up.

name bytes

name is the name of the branch which should be looked up. This must be the branch name only, it must not have the "refs/heads/" prefix.

FindBranchResponse

FindBranchResponse is a response for the FindBranch RPC.

FieldTypeLabelDescription
branch Branch

branch is the found branch.

FindDefaultBranchNameRequest

FindDefaultBranchNameRequest is a request for the FindDefaultBranchName RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to find the default branch from.

head_only bool

head_only when true will determine the default branch using HEAD only instead of using the heuristic. The returned reference may not exist.

FindDefaultBranchNameResponse

FindDefaultBranchNameResponse is a response for the FindDefaultBranchName RPC.

FieldTypeLabelDescription
name bytes

name is the fully qualified default branch name.

FindLocalBranchesRequest

FindLocalBranchesRequest is a request for the FindLocalBranches RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to find the branch in.

sort_by FindLocalBranchesRequest.SortBy

sort_by sets which field the returned branches are sorted by.

pagination_params PaginationParameter

pagination_params controls paging. Refer to PaginationParameter documentation for further info.

FindLocalBranchesResponse

FindLocalBranchesResponse is a response for the FindLocalBranches RPC.

FieldTypeLabelDescription
local_branches Branch repeated

local_branches is a list of local branches found in the repository.

FindRefsByOIDRequest

FindRefsByOIDRequest is a request for the FindRefsByOID RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which references will be looked for.

oid string

oid is an object ID to find references for.

ref_patterns string repeated

ref_patterns can be one of branch name, tag name or fully qualified ref name. Providing more than one pattern will yield refs that match any of the given patterns. If left empty, defaults to "refs/heads/" and "refs/tags/"

sort_field string

sort_field determines the sort order of the resulting refs. If left empty, defaults to "refname" (lexicographic refname order)

limit uint32

limit limits the amount of results returned. 0 means no limit.

FindRefsByOIDResponse

FindRefsByOIDResponse is a response for the FindRefsByOID RPC.

FieldTypeLabelDescription
refs string repeated

refs is the set of fully-qualified references which have been found.

FindTagError

FindTagError is an error that will be returned by the FindTag RPC under specific error

conditions.

FieldTypeLabelDescription
tag_not_found ReferenceNotFoundError

tag_not_found indicates that the tag was not found.

FindTagRequest

FindTagRequest is a request for the FindTag RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to look up the tag in.

tag_name bytes

tag_name is the name of the tag that should be looked up. The caller is supposed to pass in the tag name only, so if e.g. a tag `refs/tags/v1.0.0` exists, then the caller should pass `v1.0.0` as argument.

FindTagResponse

FindTagResponse is a response for the FindTag RPC.

FieldTypeLabelDescription
tag Tag

tag is the tag that was found.

GetTagMessagesRequest

GetTagMessagesRequest is a request for the GetTagMessages RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to get tag messages from.

tag_ids string repeated

tag_ids is the list of annotated tag IDs used to get the tag messages.

GetTagMessagesResponse

GetTagMessagesResponse is a response for the GetTagMessages RPC. Annotated tag messages are

chunked and streamed back to the client across multiple response messages sequentially. Each

series of responses for a given tag begins with a response that contains only the associated tag

ID and is subsequently followed by responses containing the tag message contents. This is

repeated for each annotated tag included as part of the response stream.

FieldTypeLabelDescription
message bytes

message content from the annotated tag message.

tag_id string

tag_id is the ID of the tag for which the message belongs.

GetTagSignaturesRequest

GetTagSignaturesRequest is a request for the GetTagSignatures RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which tag signatures should be looked up.

tag_revisions string repeated

tag_revisions is the set of revisions which that should be looked up. Revisions supports the syntax as specified by gitrevisions(7). All revisions are expected to resolve to annotated tag objects. At least one revision must be provided.

GetTagSignaturesResponse

GetTagSignaturesResponse is a response for a GetTagSignatures request. Each response

may contain multiple TagSignatures. In case TagSignatures don't fit into a single

response, signatures will be batched in multiple responses.

FieldTypeLabelDescription
signatures GetTagSignaturesResponse.TagSignature repeated

signatures is the set of signatures found.

GetTagSignaturesResponse.TagSignature

TagSignature represents the signature of a signed tag.

FieldTypeLabelDescription
tag_id string

tag_id is the resolved object ID of the tag.

signature bytes

signature contains the cryptographic signature of the tag. If the tag is not cryptographically signed, then the signature is unset.

content bytes

content contains the contents which are signed by the signature. Contents include both the commit message, but also the commit metadata like author and subject.

ListBranchNamesContainingCommitRequest

ListBranchNamesContainingCommitRequest is a request for the ListBranchNamesContainingCommit RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to find branches with the specified commit in.

commit_id string

commit_id is the commit ID used to find branches.

limit uint32

limit the number of tag names to be returned If the limit is set to zero, all items will be returned

ListBranchNamesContainingCommitResponse

ListBranchNamesContainingCommitResponse is a response for the ListBranchNamesContainingCommit RPC.

FieldTypeLabelDescription
branch_names bytes repeated

branch_names contains a list of found branch names.

ListRefsRequest

ListRefsRequest is a request for the ListRefs RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which references should be listed in.

patterns bytes repeated

patterns contains all patterns which shall be listed. Patterns should be in the format accepted by git-for-each-ref(1). At least one pattern must be given, otherwise an error is returned. Patterns which don't match any reference will be silently ignored.

head bool

head determines whether the RPC should also return the HEAD reference. By default, pseudo-refs are not included in the response.

sort_by ListRefsRequest.SortBy

sort_by allows to request SHAs in particular order.

pointing_at_oids bytes repeated

pointing_at_oids is a list of OIDs that can optionally be passed to only return refs pointing at the given OIDs. This corresponds to the --points-at option of git-for-each-ref(1).

peel_tags bool

peel_tags controls whether annotated tags should be peeled to their target objects so that the `PeeledTarget` returned for the reference is the ID of the target object. Note that this will significantly slow down the request by a factor of 3 to 4.

ListRefsRequest.SortBy

SortBy defines the field to sort on and its direction.

FieldTypeLabelDescription
key ListRefsRequest.SortBy.Key

key is a key used for sorting.

direction SortDirection

direction is the direction that tags should be sorted in.

ListRefsResponse

ListRefsResponse is a response for the ListRefs RPC. The RPC can return multiple responses

in case there are more references than fit into a single gRPC message.

FieldTypeLabelDescription
references ListRefsResponse.Reference repeated

references is the set of references returned by the RPC.

ListRefsResponse.Reference

Reference is a direct Git reference. No symbolic references will ever be returned by this RPC.

FieldTypeLabelDescription
name bytes

name is the fully qualified name of the reference.

target string

target is the object ID the reference points to.

peeled_target string

peeled_target is the object ID an annotated tag points to. This field is only set when `PeelTags=true`. This field is empty in case the object is not an annotated tag.

ListTagNamesContainingCommitRequest

ListTagNamesContainingCommitRequest is a request for the ListTagNamesContainingCommit RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to find tags with the specified commit in.

commit_id string

commit_id is the commit ID used to find tags.

limit uint32

limit the number of tag names to be returned If the limit is set to zero, all items will be returned

ListTagNamesContainingCommitResponse

ListTagNamesContainingCommitResponse is a response for the ListTagNamesContainingCommit RPC.

FieldTypeLabelDescription
tag_names bytes repeated

tag_names contains a list of tag names found.

RefExistsRequest

RefExistsRequest is a request for the RefExists RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to check if the reference exists in.

ref bytes

ref denotes any ref, e.g. 'refs/heads/master' or 'refs/tags/v1.0.1'. Must start with 'refs/'.

RefExistsResponse

RefExistsResponse is a response for the RefExists RPC.

FieldTypeLabelDescription
value bool

value represents if the reference exists.

UpdateReferencesError

UpdateReferencesError is returned when UpdateReferences fails to update references in some specific well-defined

cases.

FieldTypeLabelDescription
invalid_format InvalidRefFormatError

invalid_format is returned when one or more of the refs to be deleted have an invalid format.

references_locked ReferencesLockedError

references_locked is returned when the references to be deleted are already locked by another process.

reference_state_mismatch ReferenceStateMismatchError

reference_state_mismatch is return for unforced reference updates when the expected object ID does not match the actual object ID of the reference. This indicates either mismatching expectations or a race with another client that has updated the reference concurrently.

UpdateReferencesRequest

UpdateReferencesRequest is a request for the UpdateReferences RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository where references shall be updated in.

updates UpdateReferencesRequest.Update repeated

updates is the set of reference updates that shall be performed.

UpdateReferencesRequest.Update

Update represents a reference update.

FieldTypeLabelDescription
reference bytes

reference is the fully-qualified reference name that should be updated.

old_object_id bytes

old_object_id is the object ID the reference should be pointing to in order to be updated. This has the intent to avoid time-of-check-time-of-use-style races when the object ID has changed. If empty, the reference will be force-updated without any such checks. If set to the all-zeroes object ID, this will verify that the branch did not exist previously.

new_object_id bytes

new_object_id is the object ID the reference should be updated to. If set to the all-zeroes object ID the branch will be deleted.

UpdateReferencesResponse

UpdateReferencesResponse is a response for the UpdateReferences RPC.

FindAllTagsRequest.SortBy.Key

Key is a key used for sorting.

NameNumberDescription
REFNAME 0

REFNAME is for the `refname` field and is the default option. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

CREATORDATE 1

CREATORDATE is for the `creatordate` field. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

VERSION_REFNAME 2

VERSION_REFNAME sorts tags by their semantic versions (https://semver.org/). tag names that are not semantic versions are sorted lexicographically. They come before the semantic versions if the direction is ascending and after the semantic versions if the direction is descending. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

FindLocalBranchesRequest.SortBy

SortBy defines the allowed field names which references can be sorted by.

https://git-scm.com/docs/git-for-each-ref#Documentation/git-for-each-ref.txt---sortltkeygt

NameNumberDescription
NAME 0

NAME is for the `--sort=refname` option and is the default option. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

UPDATED_ASC 1

UPDATED_ASC is for the `--sort=committerdate` option. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

UPDATED_DESC 2

UPDATED_DESC is for the `--sort=-committerdate` option. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

ListRefsRequest.SortBy.Key

Key is a key used for sorting.

https://git-scm.com/docs/git-for-each-ref#Documentation/git-for-each-ref.txt---sortltkeygt

NameNumberDescription
REFNAME 0

REFNAME is for the `refname` field and is the default option. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

CREATORDATE 1

CREATORDATE is for the `creatordate` field. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

AUTHORDATE 2

AUTHORDATE is for the `authordate` field. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

COMMITTERDATE 3

COMMITTERDATE is for the `committerdate` field. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

RefService

RefService is a service that provides RPCs to list and modify Git references.

Method NameRequest TypeResponse TypeDescription
FindDefaultBranchName FindDefaultBranchNameRequest FindDefaultBranchNameResponse

FindDefaultBranchName looks up the default branch reference name. Unless otherwise specified the following heuristic is used: 1. If there are no branches, return an empty string. 2. If there is only one branch, return the only branch. 3. If a branch exists that matches HEAD, return the HEAD reference name. 4. If a branch exists named refs/heads/main, return refs/heads/main. 5. If a branch exists named refs/heads/master, return refs/heads/master. 6. Return the first branch (as per default ordering by git).

FindLocalBranches FindLocalBranchesRequest FindLocalBranchesResponse stream

FindLocalBranches finds all the local branches under `refs/heads/` for the specified repository. The response is streamed back to the client to divide the list of branches into chunks.

FindAllBranches FindAllBranchesRequest FindAllBranchesResponse stream

FindAllBranches finds all branches under `refs/heads/` and `refs/remotes/` for the specified repository. The response is streamed back to the client to divide the list of branches into chunks.

FindAllTags FindAllTagsRequest FindAllTagsResponse stream

FindAllTags finds all tags under `refs/tags/` for the specified repository. The response is streamed back to the client to divide the list of tags into chunks.

FindTag FindTagRequest FindTagResponse

FindTag looks up a tag by its name and returns it to the caller if it exists. This RPC supports both lightweight and annotated tags. Note: this RPC returns an `Internal` error if the tag was not found.

FindAllRemoteBranches FindAllRemoteBranchesRequest FindAllRemoteBranchesResponse stream

FindAllRemoteBranches finds all the remote branches under `refs/remotes/` for the specified repository. The response is streamed back to the client to divide the list of branches into chunks.

RefExists RefExistsRequest RefExistsResponse

RefExists checks if the specified reference exists. The reference must be fully qualified.

FindBranch FindBranchRequest FindBranchResponse

FindBranch finds a branch by its unqualified name (like "master") and returns the commit it currently points to.

UpdateReferences UpdateReferencesRequest stream UpdateReferencesResponse

UpdateReferences atomically updates a set of references to a new state. This RPC allows creating new references, deleting old references and updating existing references in a raceless way. Updating symbolic references with this RPC is not allowed.

DeleteRefs DeleteRefsRequest DeleteRefsResponse

DeleteRefs deletes the specified references from its repository. Attempting to delete an non-existent reference does not result in an error. It is recommended to instead use the UpdateReferences RPC because it can delete references in a raceless manner via the expected old object ID.

ListBranchNamesContainingCommit ListBranchNamesContainingCommitRequest ListBranchNamesContainingCommitResponse stream

ListBranchNamesContainingCommit finds all branches under `refs/heads/` that contain the specified commit. The response is streamed back to the client to divide the list of branches into chunks.

ListTagNamesContainingCommit ListTagNamesContainingCommitRequest ListTagNamesContainingCommitResponse stream

ListTagNamesContainingCommit finds all tags under `refs/tags/` that contain the specified commit. The response is streamed back to the client to divide the list of tags into chunks.

GetTagSignatures GetTagSignaturesRequest GetTagSignaturesResponse stream

GetTagSignatures returns signatures for annotated tags resolved from a set of revisions. Revisions which don't resolve to an annotated tag are silently discarded. Revisions which cannot be resolved result in an error. Tags which are annotated but not signed will return a TagSignature response which has no signature, but its unsigned contents will still be returned.

GetTagMessages GetTagMessagesRequest GetTagMessagesResponse stream

GetTagMessages returns tag messages for the annotated tags identified via the given revisions. The response is streamed back to the client with a response message containing the tag ID always preceding one or more messages containing the tag message contents. This is repeated for all tags in the response.

ListRefs ListRefsRequest ListRefsResponse stream

ListRefs returns a stream of all references in the repository. By default, pseudo-revisions like HEAD will not be returned by this RPC. Any symbolic references will be resolved to the object ID it is pointing at.

FindRefsByOID FindRefsByOIDRequest FindRefsByOIDResponse

FindRefsByOID returns an array of fully qualified reference names that point to an object ID. It returns nothing if the object ID doesn't exist, or doesn't point to any branches or tags. Prefixes can be also be used as the object ID.

remote.proto

Top

FindRemoteRepositoryRequest

FindRemoteRepositoryRequest is a request for the FindRemoteRepository RPC.

FieldTypeLabelDescription
remote string

remote is the remote repository being checked. Because this RPC is not executed within a repository, the remote parameter must specify a valid Git URL for the targeted repository.

storage_name string

storage_name is used to redirect request to proper storage where it can be handled. As of now it doesn't matter what storage will be used, but it still must be a valid. For more details: https://gitlab.com/gitlab-org/gitaly/-/issues/2442

FindRemoteRepositoryResponse

FindRemoteRepositoryResponse is a response for the FindRemoteRepository RPC. This might throw a

GRPC Unavailable code to signal the request failure is transient.

FieldTypeLabelDescription
exists bool

exists specifies if the remote repository exists.

FindRemoteRootRefRequest

FindRemoteRootRefRequest represents a request for the FindRemoteRootRef RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository in which the request shall be executed in. If a remote name is given, then this is the repository in which the remote will be looked up.

remote_url string

remote_url specifies the remote repository URL which should be fetched from.

http_authorization_header string

http_authorization_header is the HTTP header which should be added to the request in order to authenticate against the repository.

resolved_address string

resolved_address holds the resolved IP address of the remote_url. This is used to avoid DNS rebinding by mapping the url to the resolved address. Only IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") forms are supported. Works with HTTP/HTTPS/Git/SSH protocols. Optional.

FindRemoteRootRefResponse

FindRemoteRootRefResponse represents the response for the FindRemoteRootRef

request.

FieldTypeLabelDescription
ref string

ref is the name of the remote root reference.

UpdateRemoteMirrorRequest

UpdateRemoteMirrorRequest is a request for the UpdateRemoteMirror RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository whose mirror repository to update.

remote UpdateRemoteMirrorRequest.Remote

remote contains parameters required to connect to the remote repository. This allows Gitaly to use an in-memory remote and does not require any on-disk remote configuration.

only_branches_matching bytes repeated

only_branches_matching contains patterns to match branches against. Only the matched branches are updated in the remote mirror. If no patterns are specified, all branches are updated. The patterns should only contain the branch name without the 'refs/heads/' prefix. "*" can be used as a wildcard to match anything. only_branches_matching can be streamed to the server over multiple messages. Optional. protolint:disable:this REPEATED_FIELD_NAMES_PLURALIZED

ssh_key string

ssh_key is the SSH key to use for accessing to the mirror repository. Optional.

known_hosts string

known_hosts specifies the identities used for strict host key checking. Optional.

keep_divergent_refs bool

keep_divergent_refs specifies whether or not to update diverged references in the mirror repository.

UpdateRemoteMirrorRequest.Remote

Remote defines a remote repository that diverged references should be pushed to.

FieldTypeLabelDescription
url string

url is the URL of the remote repository.

http_authorization_header string

http_authorization_header is an optional HTTP header used for authenticating against the remote repository.

resolved_address string

resolved_address holds the resolved IP address of the remote_url. This is used to avoid DNS rebinding by mapping the url to the resolved address. Only IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") forms are supported. Works with HTTP/HTTPS/Git/SSH protocols. Optional.

UpdateRemoteMirrorResponse

UpdateRemoteMirrorResponse is a response for the UpdateRemoteMirror RPC.

FieldTypeLabelDescription
divergent_refs bytes repeated

divergent_refs contains a list of references that had diverged in the mirror from the source repository.

RemoteService

RemoteService is a service providing RPCs to interact with a remote

repository that is hosted on another Git server.

Method NameRequest TypeResponse TypeDescription
UpdateRemoteMirror UpdateRemoteMirrorRequest stream UpdateRemoteMirrorResponse

UpdateRemoteMirror compares the references in the target repository and its remote mirror repository. Any differences in the references are then addressed by pushing the differing references to the mirror. Created and modified references are updated, removed references are deleted from the mirror. UpdateRemoteMirror updates all tags. Branches are updated if they match the patterns specified in the requests.

FindRemoteRepository FindRemoteRepositoryRequest FindRemoteRepositoryResponse

FindRemoteRepository detects whether a repository exists at the given URI. This is done by asking git-ls-remote(1) to enumerate the remote's HEAD and then checking that we recognize it as a valid reference.

FindRemoteRootRef FindRemoteRootRefRequest FindRemoteRootRefResponse

FindRemoteRootRef tries to find the root reference of a remote repository. The root reference is the default branch as pointed to by the remotes HEAD reference. Returns an InvalidArgument error if the specified remote does not exist and a NotFound error in case no HEAD branch was found.

repository.proto

Top

BackupCustomHooksRequest

BackupCustomHooksRequest ...

FieldTypeLabelDescription
repository Repository

repository ...

BackupCustomHooksResponse

BackupCustomHooksResponse ...

FieldTypeLabelDescription
data bytes

data ...

BackupRepositoryRequest

BackupRepositoryRequest is a request for the BackupRepository RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to be backed up.

vanity_repository Repository

vanity_repository is used to determine the backup path.

backup_id string

backup_id is the label used to identify this backup when restoring.

incremental bool

incremental controls whether an incremental backup should be performed. An incremental backup will attempt to locate a previous backup of this repository to base itself off.

BackupRepositoryResponse

BackupRepositoryResponse is a response for the BackupRepository RPC.

BackupRepositoryResponse.SkippedError

SkippedError is returned when the repository backup has been skipped.

CalculateChecksumRequest

CalculateChecksumRequest is a request for the CalculateChecksum RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo to calculate the checksum for. The storage_name and relative_path attributes must be provided.

CalculateChecksumResponse

CalculateChecksumResponse is a response for the CalculateChecksum RPC.

FieldTypeLabelDescription
checksum string

checksum is the checksum of the repo's references.

CreateBundleFromRefListRequest

CreateBundleFromRefListRequest is a request for the CreateBundleFromRefList RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository that the bundle is created from.

patterns bytes repeated

patterns contains all patterns which shall be bundled. Patterns should be in the format accepted by git-rev-list(1). Patterns which don't match any reference will be silently ignored.

CreateBundleFromRefListResponse

CreateBundleFromRefListResponse is a response for the CreateBundleFromRefList RPC.

FieldTypeLabelDescription
data bytes

data contains the content of the created bundle.

CreateBundleRequest

CreateBundleRequest is a request for the CreateBundle RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to create a bundle from. The storage_name and relative_path attributes must be provided.

CreateBundleResponse

CreateBundleResponse is a response for the CreateBundle RPC.

FieldTypeLabelDescription
data bytes

data contains the content of the created bundle.

CreateForkRequest

CreateForkRequest is a request for the CreateFork RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository that shall be created.

source_repository Repository

source_repository is the repository that shall be forked. Note that the source repository is intentionally not marked as an additional repository that is to be rewritten by Praefect. This is because Gitaly will use the source repository to perform a gRPC call, which must use the original non-rewritten repository.

revision bytes

revision to create the fork from. If set, the resulting fork will only have a single branch that matches the upstream revision. This revision will be the default branch of the repository. This field should be set to the unqualified revision, not the full reference name.

CreateForkResponse

CreateForkResponse is a response for the CreateFork RPC.

CreateRepositoryFromBundleRequest

CreateRepositoryFromBundleRequest is a request for the CreateRepositoryFromBundle RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to be created from the Git bundle. Repository should only be present in the first message of the stream.

data bytes

data contains bytes of the Git bundle file being streamed.

CreateRepositoryFromBundleResponse

CreateRepositoryFromBundleResponse is a response for the CreateRepositoryFromBundle RPC.

CreateRepositoryFromSnapshotRequest

CreateRepositoryFromSnapshotRequest is a request for the CreateRepositoryFromSnapshot RPC.

FieldTypeLabelDescription
repository Repository

repository indicates where the new repo should be created. The storage_name and relative_path attributes must be provided.

http_url string

http_url is the full URL of the location of the snapshot TAR.

http_auth string

http_auth is the value of the Authorization header to send to http_url.

resolved_address string

resolved_address holds the resolved IP address of the remote_url. This is used to avoid DNS rebinding by mapping the url to the resolved address. Only IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") forms are supported. Works with HTTP/HTTPS protocols. Optional.

CreateRepositoryFromSnapshotResponse

CreateRepositoryFromSnapshotResponse is a response for the CreateRepositoryFromSnapshot RPC.

CreateRepositoryFromURLError

CreateRepositoryFromURLError is an error that will be returned by the CreateRepositoryFromURL RPC under specific error

CreateRepositoryFromURLError.

FieldTypeLabelDescription
remote_not_found RemoteNotFoundError

remote_not_found indicates that the remote repository was not found.

CreateRepositoryFromURLRequest

CreateRepositoryFromURLRequest is a request for the CreateRepositoryFromURL RPC.

FieldTypeLabelDescription
repository Repository

repository represents where the repo should be created. The storage_name and relative_path attributes must be provided.

url string

url is the URL of the existing Git repository.

http_authorization_header string

http_authorization_header is the HTTP header which can be added to the request in order to authenticate against the repository.

mirror bool

mirror defines whether to clone with `--mirror` flag or `--bare`. The default value `false` will cause us to use `--bare`, which results in a clone that contains only branches (`refs/heads/`) and tags (`refs/tags/`) of the remote repository. If set to `true`, create a complete mirror-clone which maps all remote references into the local repository.

resolved_address string

resolved_address holds the resolved IP address of the remote_url. This is used to avoid DNS rebinding by mapping the url to the resolved address. Only IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") forms are supported. Works with HTTP/HTTPS/Git/SSH protocols. Optional.

CreateRepositoryFromURLResponse

CreateRepositoryFromURLResponse is a response for the CreateRepositoryFromURL RPC.

CreateRepositoryRequest

CreateRepositoryRequest is a request for the CreateRepository RPC.

FieldTypeLabelDescription
repository Repository

repository represents the repo to create. The storage_name and relative_path attributes must be provided.

default_branch bytes

default_branch is the branch name to set as the default branch of the newly created repository. Note, this will be treated as the branch name and not a fully qualified reference.

object_format ObjectFormat

object_format is the object format the repository should be created with. Note that this is experimental and should not be used by callers yet. It is mostly intended for internal testing purposes in Gitaly right now.

CreateRepositoryResponse

CreateRepositoryResponse is a response for the CreateRepository RPC. An empty

response denotes a successful request.

DryRunReftableMigrationRequest

DryRunReftableMigrationRequest is a request for the DryRunReftableMigration RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to dry-run migrations on.

DryRunReftableMigrationResponse

DryRunReftableMigrationResponse is a response for the DryRunReftableMigration RPC.

FieldTypeLabelDescription
time google.protobuf.Duration

time is the amount of time the migrations took.

FastExportRequest

FastExportRequest is a request for the FastExport RPC

FieldTypeLabelDescription
repository Repository

repository is the repository to generate export data for.

FastExportResponse

FastExportResponse is a response for the FastExport RPC

FieldTypeLabelDescription
data bytes

data contains the content of the export of the repository.

FetchBundleRequest

FetchBundleRequest is a request for the FetchBundle RPC.

FieldTypeLabelDescription
repository Repository

repository into which the reference shall be fetched.

data bytes

data is the bundle file stream.

update_head bool

update_head will update HEAD if there is a HEAD reference listed in the bundle

FetchBundleResponse

FetchBundleResponse is a response for the FetchBundle RPC.

FetchRemoteRequest

FetchRemoteRequest is a request for the FetchRemote RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to fetch the remote into. The storage_name and relative_path attributes must be provided.

force bool

force determines if references should be force-updated in case they have diverged.

no_tags bool

no_tags determines whether tags should be fetched.

timeout int32

timeout specifies a timeout for the fetch.

ssh_key string

ssh_key is an optional SSH key to use for fetching the remote.

known_hosts string

known_hosts is the optional content of an SSH known-hosts file to use for the SSH session.

no_prune bool

no_prune will the fetch to not prune remote references which do not exist in the remote repository anymore.

remote_params Remote

remote_params specifies the remote repository which should be fetched from.

check_tags_changed bool

check_tags_changed defines whether to check if any tags were modified, returning the result in the tags_changed field of FetchRemoteResponse.

FetchRemoteResponse

FetchRemoteResponse is a response for the FetchRemote RPC.

FieldTypeLabelDescription
tags_changed bool

tags_changed is set based to true if tags were changed or cannot be determined and false when no tags were change.

repo_changed bool

repo_changed is set to true if the repo was changed.

FetchSourceBranchRequest

FetchSourceBranchRequest is a request for the FetchSourceBranch RPC.

FieldTypeLabelDescription
repository Repository

repository into which the reference shall be fetched. After a successful call, it should contain the target reference which points to the same commit as the source repository's source branch.

source_repository Repository

source_repository is the repository from which to fetch the source branch from.

source_branch bytes

source_branch is the name of the branch in the source repository which should be fetched.

target_ref bytes

target_ref is the name of the reference which shall be newly created in the target repository.

expected_target_old_oid string

expected_target_old_oid is the object ID to which target_ref is expected to point. This is an optional safety guard to avoid races when target_ref has been concurrently updated.

FetchSourceBranchResponse

FetchSourceBranchResponse is a response for the FetchSourceBranch RPC.

FieldTypeLabelDescription
result bool

result denotes if the source branch was successfully fetched into the target repository. It is false if resolving the remote reference or fetching it failed.

FindLicenseRequest

FindLicenseRequest asks to detect the license for the given repository.

FieldTypeLabelDescription
repository Repository

repository is repository where to detect the license.

FindLicenseResponse

FindLicenseResponse contains the result of detecting the license used in the repository.

If there is nothing that looks like a license file, the empty response is returned.

If there is something that looks like a license, but that license can't be found in the

list of known licenses, we return a pre-defined response with "Other" license.

FieldTypeLabelDescription
license_short_name string

license_short_name is the license unique SPDX identifier or a short name. It is always returned lower-cased.

license_name string

license_name is the license full name.

license_url string

license_url is a URL to the license on the internet.

license_path string

license_path is a path to the file that contains the text of the license. When a LICENSE file is found containing the filename of another file, that filename will be returned, for example "mit.txt".

license_nickname string

license_nickname is a shortened full name for better readability. It exists only for a small set of licenses and an empty value is returned in most cases.

FindMergeBaseRequest

FindMergeBaseRequest is a request for the FindMergeBase RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo to find the merge base in. The storage_name and relative_path attributes must be provided.

revisions bytes repeated

revisions is the revisions to find the merge base for. We use a repeated field because rugged supports finding a base for more than 2 revisions, so if we needed that in the future we don't need to change the protocol.

FindMergeBaseResponse

FindMergeBaseResponse is a response for the FindMergeBase RPC.

FieldTypeLabelDescription
base string

base is the commit ID of the best ancestor between the provided revisions.

FsckRequest

FsckRequest is a request for the Fsck RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository that shall be checked for consistency.

FsckResponse

FsckResponse is a response for the Fsck RPC.

FieldTypeLabelDescription
error bytes

error contains both stdout and stderr of git-fsck(1) in case it returned an error.

GenerateBundleURIRequest

GenerateBundleURIRequest is a request for the GenerateBundleURI RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository that the bundle is created for.

GenerateBundleURIResponse

GenerateBundleURIResponse is a response for the GenerateBundleURI RPC.

GetArchiveRequest

GetArchiveRequest is a request for the GetArchive RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo to archive. The storage_name and relative_path attributes must be provided.

commit_id string

commit_id is the commit at which to perform the archive.

prefix string

prefix is an optional prefix to add to paths in the archive.

format GetArchiveRequest.Format

format is the archive format to stream in the response.

path bytes

path is the subdirectory of the repo to archive. Provide "." for the entire repo.

exclude bytes repeated

exclude is a set of paths to exclude from the archive. The paths must exist in the tree of the provided commit_id. protolint:disable:this REPEATED_FIELD_NAMES_PLURALIZED

elide_path bool

elide_path whether to elide subdirectories. If it is true and `path` refers to a subdirectory, that subdirectory will be elided from archive entries. For example, if `dir` contains `README.md`, with `elide_path = false` the corresponding entry will be `dir/README.md`; with `elide_path = true`, the entry will be `README.md`. `elide_path` has no effect if `path` refers to the repository root. `elide_path = true` is not supported if `path` refers to a file.

include_lfs_blobs bool

include_lfs_blobs controls whether Git LFS Objects are included in the archive.

GetArchiveResponse

GetArchiveResponse is a response for the GetArchive RPC.

FieldTypeLabelDescription
data bytes

data contains the archive in the requested format.

GetConfigRequest

GetConfigRequest is a request for the GetConfig RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository from which the configuration should be read from.

GetConfigResponse

GetConfigResponse is a response for the GetConfig RPC.

FieldTypeLabelDescription
data bytes

data contains contents of the gitconfig.

GetCustomHooksRequest

GetCustomHooksRequest is a request for the GetCustomHooks RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo to retrieve custom hooks from. The storage_name and relative_path attributes must be provided.

GetCustomHooksResponse

GetCustomHooksResponse is a response for the GetCustomHooks RPC.

FieldTypeLabelDescription
data bytes

data is the tarball containing the `custom_hooks` directory.

GetFileAttributesRequest

GetFileAttributesRequest is a request for the GetFileAttributes RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository the file attributes shall be computed in.

revision bytes

revision is the revision where the file attributes shall be computed in.

attributes string repeated

attributes are the attributes that will be queried for.

paths string repeated

paths are the file paths that will be queried for.

GetFileAttributesResponse

GetFileAttributesResponse is a response for the GetFileAttributes RPC.

FieldTypeLabelDescription
attribute_infos GetFileAttributesResponse.AttributeInfo repeated

attribute_infos is the list of attributes that matches the given GetFileAttributesRequest protolint:disable:this REPEATED_FIELD_NAMES_PLURALIZED

GetFileAttributesResponse.AttributeInfo

AttributeInfo is a specified git attribute for a given path.

FieldTypeLabelDescription
path string

path is the file path for the current attribute value.

attribute string

attribute is the name of the attribute.

value string

value is the current value of the attribute. "set" is used when the attribute is true, and "unset" when it's false. See gitattributes(5) and git-check-attr(1) for more info.

GetInfoAttributesRequest

GetInfoAttributesRequest ...

FieldTypeLabelDescription
repository Repository

repository ...

GetInfoAttributesResponse

GetInfoAttributesResponse ...

FieldTypeLabelDescription
attributes bytes

attributes ...

GetObjectDirectorySizeRequest

GetObjectDirectorySizeRequest is a request for the GetObjectDirectorySize RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo to query. The storage_name and relative_path attributes must be provided.

GetObjectDirectorySizeResponse

GetObjectDirectorySizeResponse is a response for the GetObjectDirectorySize RPC.

FieldTypeLabelDescription
size int64

size is the object directory size in kibibytes.

GetRawChangesRequest

GetRawChangesRequest is a request for the GetRawChanges RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to run the diff in. The storage_name and relative_path attributes must be provided.

from_revision string

from_revision is the Git revision to start the diff at.

to_revision string

to_revision is the Git revision to end the diff at.

GetRawChangesResponse

GetRawChangesResponse is a response for the GetRawChanges RPC.

FieldTypeLabelDescription
raw_changes GetRawChangesResponse.RawChange repeated

raw_changes is the set of changes between the two revisions.

GetRawChangesResponse.RawChange

RawChange represents the metadata for a single change between the two

revisions.

FieldTypeLabelDescription
blob_id string

blob_id is the OID of the file that was changed.

size int64

size is the blob size in bytes.

operation GetRawChangesResponse.RawChange.Operation

operation is the change that occurred on the file.

old_mode int32

old_mode is the previous mode of the file. This may be equal to new_mode.

new_mode int32

new_mode is the current mode of the file. This may be equal to old_mode.

new_path_bytes bytes

new_path_bytes is the new file path. This may be equal to old_path_bytes.

old_path_bytes bytes

old_path_bytes is the old file path. This may be equal to new_path_bytes.

GetSnapshotRequest

GetSnapshotRequest is a request for the GetSnapshot RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to snapshot. The storage_name and relative_path attributes must be provided.

GetSnapshotResponse

GetSnapshotResponse is a response for the GetSnapshot RPC.

FieldTypeLabelDescription
data bytes

data is the snapshot of the repo compressed as a TAR archive.

HasLocalBranchesRequest

HasLocalBranchesRequest is a request for the HasLocalBranches RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo to check. The storage_name and relative_path attributes must be provided.

HasLocalBranchesResponse

HasLocalBranchesResponse is a response for the HasLocalBranches RPC.

FieldTypeLabelDescription
value bool

value indicates whether branches exist in the repo.

ObjectFormatRequest

ObjectFormatRequest is a request for the ObjectFormat RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository for which to determine the object format.

ObjectFormatResponse

ObjectFormatResponse is a response for the ObjectFormat RPC.

FieldTypeLabelDescription
format ObjectFormat

format is the object format that the repository uses.

ObjectsSizeRequest

ObjectsSizeRequest is a request for the ObjectsSize RPC. The RPC is defined as a streaming RPC given that a client

may theoretically specify an unbounded number of revisions. Only the first request may have fields other than the

revisions set.

FieldTypeLabelDescription
repository Repository

repository is the repository for which to determine the object size.

revisions bytes repeated

revisions is the set of revisions that shall be used to compute the object size for. Supports normal revisions as well as pseudo-revisions like `--not`, `--all`, `--branches[=pattern]`, `--tags[=pattern]` and `--glob=pattern`. Please refer to the man pages gitrevisions(7) as well as git-rev-list(1) for more information.

ObjectsSizeResponse

ObjectsSizeResponse is a response for the ObjectsSize RPC.

FieldTypeLabelDescription
size uint64

size is the total size of all objects reachable via the given set of revisions. The size is specified in bytes.

OptimizeRepositoryRequest

OptimizeRepositoryRequest is a request for the OptimizeRepository RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository that should be optimized.

strategy OptimizeRepositoryRequest.Strategy

strategy is the strategy that determines which parts of the repository shall be optimized.

OptimizeRepositoryResponse

OptimizeRepositoryResponse is a response for the OptimizeRepository RPC.

PruneUnreachableObjectsRequest

PruneUnreachableObjectsRequest is a request for the PruneUnreachableObjects

RPC call.

FieldTypeLabelDescription
repository Repository

repository is the repo to prune. The storage_name and relative_path attributes must be provided.

PruneUnreachableObjectsResponse

PruneUnreachableObjectsResponse is a response for the

PruneUnreachableObjects RPC call.

Remote

Remote represents a git remote repository.

FieldTypeLabelDescription
url string

url is the URL of the remote repository.

http_authorization_header string

http_authorization_header is the HTTP header which should be added to the request in order to authenticate against the repository.

mirror_refmaps string repeated

mirror_refmaps contains the refspecs which shall be fetched. Some special refspecs are accepted: - "all_refs" gets translated to "+refs/*:refs/*", which mirrors all references of the source repository. - "heads" gets translated to "+refs/heads/*:refs/heads/*", which mirrors all branches of the source repository. - "tags" gets translated to "+refs/tags/*:refs/tags/*", which mirrors all tags of the source repository. If no refspecs are given, this defaults to "all_refs".

resolved_address string

resolved_address holds the resolved IP address of the remote_url. This is used to avoid DNS rebinding by mapping the url to the resolved address. Only IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") forms are supported. Works with HTTP/HTTPS/Git/SSH protocols. Optional.

RemoveRepositoryRequest

RemoveRepositoryRequest is a request for the RemoveRepository RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo to remove. The storage_name and relative_path attributes must be provided.

RemoveRepositoryResponse

RemoveRepositoryResponse is a response for the RemoveRepository RPC.

ReplicateRepositoryRequest

ReplicateRepositoryRequest is a request for the ReplicateRepository RPC.

FieldTypeLabelDescription
repository Repository

repository is the target repository that the RPC replicates to.

source Repository

source is the source repository that the RPC replicates from. This repository can sit on a different storage node. The information for how to connect to this storage node needs to be injected into the gRPC context by the caller by setting the `gitaly-servers` metadata.

ReplicateRepositoryResponse

ReplicateRepositoryResponse is a response for the ReplicateRepository RPC.

RepositoryExistsRequest

RepositoryExistsRequest is a request for the RepositoryExists RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo to check. The storage_name and relative_path attributes must be provided.

RepositoryExistsResponse

RepositoryExistsResponse is a response for the RepositoryExists RPC.

FieldTypeLabelDescription
exists bool

exists indicates whether the repo exists.

RepositoryInfoRequest

RepositoryInfoRequest is a request for the RepositoryInfo RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to query for information.

RepositoryInfoResponse

RepositoryInfoResponse is a response for the RepositoryInfo RPC.

FieldTypeLabelDescription
size uint64

size is the total size of all files part of the repository. It does not include the size of directories.

references RepositoryInfoResponse.ReferencesInfo

references contains information about references.

objects RepositoryInfoResponse.ObjectsInfo

objects contains information about objects.

commit_graph RepositoryInfoResponse.CommitGraphInfo

commit_graph contains information about the repository's commit-graphs.

bitmap RepositoryInfoResponse.BitmapInfo

bitmap contains information about the bitmap, if any exists.

multi_pack_index RepositoryInfoResponse.MultiPackIndexInfo

multi_pack_index contains information about the multi-pack-index, if any exists.

multi_pack_index_bitmap RepositoryInfoResponse.BitmapInfo

multi_pack_index_bitmap contains information about the bitmap for the multi-pack-index.

alternates RepositoryInfoResponse.AlternatesInfo

alternates contains information about alternate object directories.

is_object_pool bool

is_object_pool determines whether the repository is an object pool.

last_full_repack google.protobuf.Timestamp

last_full_repack indicates the last date at which a full repack has been performed.

RepositoryInfoResponse.AlternatesInfo

AlternatesInfo hosts information about alternate object directories.

FieldTypeLabelDescription
object_directories string repeated

object_directories contains the list of paths to object directories that the repository is linked to.

last_modified google.protobuf.Timestamp

last_modified is the time when the alternates file has last been modified.

RepositoryInfoResponse.BitmapInfo

BitmapInfo hosts information about bitmaps in a repository.

FieldTypeLabelDescription
has_hash_cache bool

has_hash_cache indicates whether the name hash cache extension exists in the bitmap.

has_lookup_table bool

has_lookup_table indicates whether the lookup table exists in the bitmap.

version uint64

version is the version of the bitmap (currently only version 1 is supported by Git).

RepositoryInfoResponse.CommitGraphInfo

CommitGraphInfo hosts information about the commit-graph of a repository.

FieldTypeLabelDescription
commit_graph_chain_length uint64

commit_graph_chain_length is the length of the commit-graph chain, if it exists. If the repository does not have a commit-graph chain but a monolithic commit-graph, then this field will be set to 0.

has_bloom_filters bool

has_bloom_filters tells whether the commit-graph has bloom filters. Bloom filters are used to answer the question whether a certain path has been changed in the commit the bloom filter applies to.

has_generation_data bool

has_generation_data tells whether the commit-graph has generation data. Generation data is stored as the corrected committer date, which is defined as the maximum of the commit's own committer date or the corrected committer date of any of its parents. This data can be used to determine whether a commit A comes after a certain commit B.

has_generation_data_overflow bool

has_generation_data_overflow stores overflow data in case the corrected committer date takes more than 31 bits to represent.

RepositoryInfoResponse.MultiPackIndexInfo

MultiPackIndexInfo hosts information about the multi-pack-index.

FieldTypeLabelDescription
packfile_count uint64

packfile_count is the count of packfiles that the multi-pack-index tracks.

version uint64

version is the version of the multi-pack-index (currently only version 1 is supported by Git).

RepositoryInfoResponse.ObjectsInfo

ObjectsInfo hosts info about objects contained in a repository. It tries to bridge the gap

between the actual on-disk state that is changing over time as Git introduces new ways to

perform repository housekeeping and specific classifications of objects.

One of the distinctions is between "recent" and "stale" objects. The set of recent objects

contains these objects that have either been recently written/accessed or those which are

reachable via any of the references. Stale objects on the other hand are those that are older

than a certain grace period and which are not reachable via any reference. The exact details

when the set of stale and recent objects is updated is an internal implementation detail of

Gitaly and subject to change. It is safe to assume though that unreachable objects will

eventually be marked stale when repository housekeeping runs on a repository.

FieldTypeLabelDescription
size uint64

size is the total size of all objects in the repository in bytes. It makes no distinction between the way they are stored or whether they are pending deletion.

recent_size uint64

recent_size is the total size of all objects in bytes that are considered to be recent. Recent objects are likely reachable and will not be considered for deletion.

stale_size uint64

stale_size is the total size of all objects in bytes that are considered to be stale. Stale objects are likely unreachable and will eventually be deleted after a grace period. Objects which are part of cruft packs are always considered to be stale.

keep_size uint64

keep_size is the total size of all kept packfiles. Kept packfiles are packfiles that have a `.keep` file accompanying them. Packfiles marked with such a file will never be deleted by Git and will thus stay around forever, even if their objects are part of other packfiles already.

packfile_count uint64

packfile_count is the number of all packfiles, including stale and kept ones.

reverse_index_count uint64

reverse_index_count is the number of reverse indices.

cruft_count uint64

cruft_count is the number of cruft packfiles which have a .mtimes file.

keep_count uint64

keep_count is the number of .keep packfiles.

loose_objects_count uint64

loose_objects_count is the number of loose objects.

stale_loose_objects_count uint64

stale_loose_objects_count is the number of stale loose objects.

loose_objects_garbage_count uint64

loose_objects_garbage_count is the number of garbage files in loose objects shards.

RepositoryInfoResponse.ReferencesInfo

ReferencesInfo hosts information about references.

FieldTypeLabelDescription
loose_count uint64

loose_count is the number of loose references that exist in the repository. These references are written whenever any reference either gets updated or created. Loose references have not yet been compressed into a packed format, which is an action that Gitaly performs regularly during repository maintenance. We do not provide the total size of loose references as it is a constant factor of the count anyway: `$count * $object_hash_length`.

packed_size uint64

packed_size is the size of packed references in bytes. Packed references are a more efficient way to store loose references. Given that determining the exact amount of references stored in packed format would require us to process the complete contents we don't provide the size here. A very rough estimate would be: `$size / 100`.

reference_backend RepositoryInfoResponse.ReferencesInfo.ReferenceBackend

reference_backend is the backend used for storing references in the repository.

RepositorySizeRequest

RepositorySizeRequest is a request for the RepositorySize RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository for which to determine the repository size.

RepositorySizeResponse

RepositorySizeResponse is a response for the RepositorySize RPC.

FieldTypeLabelDescription
size int64

size is the complete size of the on-disk repository in kilobytes. This will include all data structures and is similar to `du --summarize --bytes $REPO_PATH`.

RestoreCustomHooksRequest

RestoreCustomHooksRequest ...

FieldTypeLabelDescription
repository Repository

repository ...

data bytes

data ...

RestoreCustomHooksResponse

RestoreCustomHooksResponse ...

RestoreRepositoryRequest

RestoreRepositoryRequest is a request for the RestoreRepository RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository to be restored.

vanity_repository Repository

vanity_repository is used to determine the backup path.

backup_id string

backup_id is the label used to identify the backup to restore from. If empty, the latest available backup is used.

always_create bool

always_create will force the repository to exist even if no bundle is found. See https://gitlab.com/gitlab-org/gitlab/-/issues/357044

RestoreRepositoryResponse

RestoreRepositoryResponse is a response for the RestoreRepository RPC.

RestoreRepositoryResponse.SkippedError

SkippedError is returned when the repository restore has been skipped.

SearchFilesByContentRequest

SearchFilesByContentRequest is a request for the SearchFilesByContent RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo to search. The storage_name and relative_path attributes must be provided.

query string

query is the grep pattern to use. Queries are case-insensitive and are compatible with Perl regexp syntax.

ref bytes

ref is the reference to limit the search scope by, for example a commit or branch name.

SearchFilesByContentResponse

SearchFilesByContentResponse is a response for the SearchFilesByContent RPC.

FieldTypeLabelDescription
match_data bytes

match_data contains the results of the search. Data is streamed in chunks, where each chunk is an individual result.

end_of_match bool

end_of_match indicates the end of an individual match results. Additional results may follow in subsequent gRPC messages.

SearchFilesByNameRequest

SearchFilesByNameRequest is a request for the SearchFilesByName RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo to execute the search in. The storage_name and relative_path attributes must be provided.

query string

query is the search query.

ref bytes

ref is the Git reference whose tree should be searched.

filter string

filter is a regular expression used to filter the result set before it is transmitted. It is parsed using Go's `regexp` package, which is closely related to PCRE, excluding backreferences, atomic/possesive operators, and some other features. It has a maximum length of 1000 bytes.

limit uint32

limit the number of returned files. Gitaly does not enforce a limit by default. Clients should always set a value for this field. limit = 0 means unlimited files.

offset uint32

offset says to skip that many files before beginning to return files. offset = 0 means starting to return files from beginning.

SearchFilesByNameResponse

SearchFilesByNameResponse is a response for the SearchFilesByName RPC.

FieldTypeLabelDescription
files bytes repeated

files contains the paths of files that have been found to match the query.

SetCustomHooksRequest

SetCustomHooksRequest is a request for the SetCustomHooks RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo to set the custom hooks in. The storage_name and relative_path attributes must be provided. The repository can be omitted in subsequent requests.

data bytes

data is a tarball containing a `custom_hooks` directory.

SetCustomHooksResponse

SetCustomHooksResponse is a response for the SetCustomHooks RPC.

WriteRefRequest

WriteRefRequest is a request for the WriteRef RPC.

FieldTypeLabelDescription
repository Repository

repository is the repo in which to write a ref. The storage_name and relative_path attributes must be provided.

ref bytes

ref is the ref to create or update. It should be a fully-resolved value like refs/heads/main.

revision bytes

revision is the new value that the ref should point to.

old_revision bytes

old_revision is the previous value of the ref, used to prevent race conditions. If an all-zero object ID is provided, the ref will only be updated if it did not previously exist.

WriteRefResponse

WriteRefResponse is a response for the WriteRef RPC.

GetArchiveRequest.Format

Format is the format which the archive should be packaged in.

NameNumberDescription
ZIP 0

ZIP protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

TAR 1

TAR protolint:disable:this ENUM_FIELD_NAMES_PREFIX

TAR_GZ 2

TAR_GZ protolint:disable:this ENUM_FIELD_NAMES_PREFIX

TAR_BZ2 3

TAR_BZ2 protolint:disable:this ENUM_FIELD_NAMES_PREFIX

GetRawChangesResponse.RawChange.Operation

Operation is the change that occurred on the file. Consult the man pages

for git-diff(1) for additional detail on the semantics of each operation.

NameNumberDescription
UNKNOWN 0

UNKNOWN protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

ADDED 1

ADDED protolint:disable:this ENUM_FIELD_NAMES_PREFIX

COPIED 2

COPIED protolint:disable:this ENUM_FIELD_NAMES_PREFIX

DELETED 3

DELETED protolint:disable:this ENUM_FIELD_NAMES_PREFIX

MODIFIED 4

MODIFIED protolint:disable:this ENUM_FIELD_NAMES_PREFIX

RENAMED 5

RENAMED protolint:disable:this ENUM_FIELD_NAMES_PREFIX

TYPE_CHANGED 6

TYPE_CHANGED protolint:disable:this ENUM_FIELD_NAMES_PREFIX

OptimizeRepositoryRequest.Strategy

Strategy determines how the repository shall be optimized.

NameNumberDescription
STRATEGY_UNSPECIFIED 0

STRATEGY_UNSPECIFIED indicates that the strategy has not been explicitly set by the caller. The default will be STRATEGY_HEURISTICAL in that case.

STRATEGY_HEURISTICAL 1

STRATEGY_HEURISTICAL performs heuristical optimizations in the repository. The server will decide on a set of heuristics which parts need optimization and which ones don't to avoid performing unnecessary optimization tasks.

STRATEGY_EAGER 2

STRATEGY_EAGER performs eager optimizations in the repository. The server will optimize all data structures regardless of whether they are well-optimized already.

STRATEGY_OFFLOADING 3

STRATEGY_OFFLOADING selectively moves repository objects to secondary storage.

RepositoryInfoResponse.ReferencesInfo.ReferenceBackend

ReferenceBackend denotes the type of backend used to store references.

NameNumberDescription
REFERENCE_BACKEND_UNSPECIFIED 0

REFERENCE_BACKEND_UNSPECIFIED is the default value for a reference backend if there is an error during detection. This state should ideally never occur, and if set it indicates that something has gone wrong.

REFERENCE_BACKEND_FILES 1

REFERENCE_BACKEND_FILES is the traditional backend built using files/directories.

REFERENCE_BACKEND_REFTABLE 2

REFERENCE_BACKEND_REFTABLE is the new backend using customized binary file format.

RepositoryService

RepositoryService is a service providing RPCs accessing repositories as a whole.

Method NameRequest TypeResponse TypeDescription
RepositoryExists RepositoryExistsRequest RepositoryExistsResponse

RepositoryExists returns whether a given repository exists.

RepositorySize RepositorySizeRequest RepositorySizeResponse

RepositorySize returns information on the complete on-disk repository size. If you need more detailed information about the size of various sub-structures you should instead use the repositoryInfo RPC.

RepositoryInfo RepositoryInfoRequest RepositoryInfoResponse

RepositoryInfo returns detailed information about a repository and its data structures.

ObjectsSize ObjectsSizeRequest stream ObjectsSizeResponse

ObjectsSize calculates the total on-disk object size of reachable objects in bytes. In contrast to RepositorySize and RepositoryInfo, this RPC performs a graph walk of the specified revisions and will thus return an accurate view of how large the accumulated on-disk size of reachable objects is. As this RPC needs to perform a revision walk, it is significantly more expensive than the RPCs which simply check the size of on-disk data structures. On the other hand, it allows the caller to accurately compute the size of objects in a way that is at least somewhat detached from the on-disk representation: - Objects which exist in multiple packfiles will not be double-counted. - Objects which aren't reachable will not be accounted for. - It is possible to only account for a subset of references, e.g. only those that an admin would have direct control over. It is thus recommended to use this RPC whenever you want to calculate sizes which will end up being shown to the user. Note that the size is still bound to change when repositories are getting repacked and thus cannot be considered to be stable. This is because the on-disk size of any object can change depending on how Git decides to deltify it in a packfile. Thus, when a repack would cause a different delta base to be picked, the actual on-disk size of any given object may change.

ObjectFormat ObjectFormatRequest ObjectFormatResponse

ObjectFormat determines the object format that is being used by the repository.

FetchRemote FetchRemoteRequest FetchRemoteResponse

FetchRemote fetches references from a remote repository into the local repository. The remote can be fetched via HTTP or SSH depending on the request options provided.

CreateRepository CreateRepositoryRequest CreateRepositoryResponse

CreateRepository creates a new empty repository.

GetArchive GetArchiveRequest GetArchiveResponse stream

GetArchive produces and returns an archive of a repository.

HasLocalBranches HasLocalBranchesRequest HasLocalBranchesResponse

HasLocalBranches returns whether the given repo contains any branches.

FetchSourceBranch FetchSourceBranchRequest FetchSourceBranchResponse

FetchSourceBranch fetches a branch from a second (potentially remote) repository into the given repository.

Fsck FsckRequest FsckResponse

Fsck checks the repository for consistency via git-fsck(1). This can be used to check for repository corruption.

WriteRef WriteRefRequest WriteRefResponse

WriteRef creates or updates a ref in a repository to point to a new value. If the request contains object revisions that do not exist in the repository, the RPC returns the NOT_FOUND code with the ReferenceNotFoundError detail.

FindMergeBase FindMergeBaseRequest FindMergeBaseResponse

FindMergeBase returns the best common ancestor between two or more commits. Consult the man pages of git-merge-base(1) for more information on how this is calculated.

CreateFork CreateForkRequest CreateForkResponse

CreateFork creates a new repository from a specific source repository. This new repository will have the same branches and tags as the source repository. Internal references will not be recreated in the forked repository. all objects of the source repository will be duplicated, that is there are no space savings by creating the repository like this. The newly created repository does not join the object pool of the source repository, if there is any.

CreateRepositoryFromURL CreateRepositoryFromURLRequest CreateRepositoryFromURLResponse

CreateRepositoryFromURL creates a new repo and seeds it with the contents of an existing Git repo reachable at the provided URL.

CreateBundle CreateBundleRequest CreateBundleResponse stream

CreateBundle creates a bundle from all refs

CreateBundleFromRefList CreateBundleFromRefListRequest stream CreateBundleFromRefListResponse stream

CreateBundleFromRefList creates a bundle from a stream of ref patterns. When the bundle would be empty the FailedPrecondition error code is returned.

GenerateBundleURI GenerateBundleURIRequest GenerateBundleURIResponse

GenerateBundleURI generates a bundle on the server for bundle-URI use.

FetchBundle FetchBundleRequest stream FetchBundleResponse

FetchBundle fetches references from a bundle into the local repository. refs will be mirrored to the target repository with the refspec "+refs/*:refs/*" and refs that do not exist in the bundle will be removed.

CreateRepositoryFromBundle CreateRepositoryFromBundleRequest stream CreateRepositoryFromBundleResponse

CreateRepositoryFromBundle creates a Git repository at the specified storage and path, if it does not already exist, from the provided Git bundle.

GetConfig GetConfigRequest GetConfigResponse stream

GetConfig reads the target repository's gitconfig and streams its contents back. Returns a NotFound error in case no gitconfig was found.

FindLicense FindLicenseRequest FindLicenseResponse

FindLicense looks in the given repository and attempts to detect all the details about the license used in the repository.

GetInfoAttributes GetInfoAttributesRequest GetInfoAttributesResponse stream

GetInfoAttributes reads the contents from info/attributes. This RPC will be removed in 17.0.

CalculateChecksum CalculateChecksumRequest CalculateChecksumResponse

CalculateChecksum returns a checksum of the repository by hashing its references. Refs outside of well-known namespaces are not considered when computing the checksum.

GetSnapshot GetSnapshotRequest GetSnapshotResponse stream

GetSnapshot returns a snapshot of the repository. A snapshot comprises all Git references and objects required to recreate the state of a repository at a point in time.

CreateRepositoryFromSnapshot CreateRepositoryFromSnapshotRequest CreateRepositoryFromSnapshotResponse

CreateRepositoryFromSnapshot creates a new repository based on a snapshot created with the GetSnapshot RPC. The snapshot is fetched via HTTP. Due to the inherent structure of the TAR format, it's challenging to definitively verify if a provided TAR file is complete or truncated/malformed. While basic integrity checks are performed, users should ensure the completeness and integrity of their TAR files.

GetRawChanges GetRawChangesRequest GetRawChangesResponse stream

GetRawChanges returns metadata in raw format on the changes between two revisions.

SearchFilesByContent SearchFilesByContentRequest SearchFilesByContentResponse stream

SearchFilesByContent searches files in the repository using the provided grep pattern. For each result, the matched line is returned along with the two previous and next lines.

SearchFilesByName SearchFilesByNameRequest SearchFilesByNameResponse stream

SearchFilesByName searches files in the repository based on its name and an optional filter.

RestoreCustomHooks RestoreCustomHooksRequest stream RestoreCustomHooksResponse

RestoreCustomHooks sets the git hooks for a repository. The hooks are sent in a tar archive containing a `custom_hooks` directory. This directory is ultimately extracted to the repository.

SetCustomHooks SetCustomHooksRequest stream SetCustomHooksResponse

SetCustomHooks sets the git hooks for a repository. The hooks are sent in a tar archive containing a `custom_hooks` directory (i.e. the response from the GetCustomHooksResponse RPC. This directory will be extracted into the repository.

BackupCustomHooks BackupCustomHooksRequest BackupCustomHooksResponse stream

BackupCustomHooks fetches the git hooks for a repository. The hooks are sent in a tar archive containing a `custom_hooks` directory. If no hooks are present in the repository, the response will have no data.

GetCustomHooks GetCustomHooksRequest GetCustomHooksResponse stream

GetCustomHooks fetches the git hooks for a repository. The hooks are sent in a tar archive containing a `custom_hooks` directory. If no hooks are present in the repository, the response will have no data.

GetObjectDirectorySize GetObjectDirectorySizeRequest GetObjectDirectorySizeResponse

GetObjectDirectorySize returns the size in kibibytes of the object directory of a repository.

RemoveRepository RemoveRepositoryRequest RemoveRepositoryResponse

RemoveRepository will move the repository to `+gitaly/tmp/<relative_path>_removed` and eventually remove it. This ensures that even on networked filesystems the data is actually removed even if there's someone still handling the data.

ReplicateRepository ReplicateRepositoryRequest ReplicateRepositoryResponse

ReplicateRepository replicates data from a source repository to target repository. On the target repository, this operation ensures synchronization of the following components: - Git config - Git attributes - Custom Git hooks, - References and objects - (Optional) Object deduplication network membership

OptimizeRepository OptimizeRepositoryRequest OptimizeRepositoryResponse

OptimizeRepository performs all maintenance tasks in a repository to keep it in an efficient state. It cleans up stale data, repacks objects, updates auxiliary caches like commit-graphs and packs references. The optimizations performed are based on heuristics and will adapt to the repository's size. This RPC call is designed as a black-box such that Gitaly has complete control of the on-disk state of repositories.

PruneUnreachableObjects PruneUnreachableObjectsRequest PruneUnreachableObjectsResponse

PruneUnreachableObjects will prune all objects which aren't reachable from the repository's current set of references. Because pruning can only happen for objects which aren't packed, you are required to first run OptimizeRepository to explode any unreachable objects into loose objects. Furthermore, this RPC call has a grace period of 30 minutes: any unreachable loose objects must not have been accessed or modified in the last 30 minutes. This is a hard requirement to avoid repository corruption. to make proper use of this RPC you thus need to call OptimizeRepository, wait 30 minutes, and then call PruneUnreachableObjects.

BackupRepository BackupRepositoryRequest BackupRepositoryResponse

BackupRepository creates a full or incremental backup streamed directly to object-storage. The backup is created synchronously. The destination must be configured in config.backup.go_cloud_url

RestoreRepository RestoreRepositoryRequest RestoreRepositoryResponse

RestoreRepository restores a backup streamed directly from object-storage. The repository is restored synchronously. The source object-storage must be configured in config.backup.go_cloud_url

GetFileAttributes GetFileAttributesRequest GetFileAttributesResponse

GetFileAttributes queries given file attributes as specified in .gitattributes file

FastExport FastExportRequest FastExportResponse stream

FastExport runs git-fast-export on the repository, streaming the data back through the response

DryRunReftableMigration DryRunReftableMigrationRequest DryRunReftableMigrationResponse

DryRunReftableMigration is an RPC used to dry-run the reftable migration. This will be removed once the migration tests have finished.

Methods with deprecated option

Method Name Option
GetInfoAttributes

true

RestoreCustomHooks

true

BackupCustomHooks

true

server.proto

Top

DiskStatisticsRequest

DiskStatisticsRequest ...

DiskStatisticsResponse

DiskStatisticsResponse ...

FieldTypeLabelDescription
storage_statuses DiskStatisticsResponse.StorageStatus repeated

storage_statuses ...

DiskStatisticsResponse.StorageStatus

StorageStatus ...

When both available and used fields are equal 0 that means that

Gitaly was unable to determine storage stats.

FieldTypeLabelDescription
storage_name string

storage_name ...

available int64

available ...

used int64

used ...

ReadinessCheckRequest

ReadinessCheckRequest is used to verify if the service is in operational state.

FieldTypeLabelDescription
timeout google.protobuf.Duration

timeout is an amount of milliseconds for the check to run before give up and mark as failed.

ReadinessCheckResponse

ReadinessCheckResponse is just a stub now and contains no information.

If the service is not in the operational state the error will be returned instead.

FieldTypeLabelDescription
ok_response ReadinessCheckResponse.Ok

ok_response is set when all checks pass.

failure_response ReadinessCheckResponse.Failure

failure_response is set if at least one check failed.

ReadinessCheckResponse.Failure

Failure represents response if at least one check failed.

FieldTypeLabelDescription
failed_checks ReadinessCheckResponse.Failure.Response repeated

failed_checks is a list of failed checks.

ReadinessCheckResponse.Failure.Response

Response contains information about failed check.

FieldTypeLabelDescription
name string

name is a name of the check that was performed.

error_message string

error_message is a cause of the check failure.

ReadinessCheckResponse.Ok

Ok represents response if none checks failed.

ServerInfoRequest

ServerInfoRequest ...

ServerInfoResponse

ServerInfoResponse ...

FieldTypeLabelDescription
server_version string

server_version ...

git_version string

git_version ...

storage_statuses ServerInfoResponse.StorageStatus repeated

storage_statuses ...

ServerInfoResponse.StorageStatus

StorageStatus ...

FieldTypeLabelDescription
storage_name string

storage_name ...

readable bool

readable ...

writeable bool

writeable ...

fs_type string

fs_type ...

filesystem_id string

filesystem_id ...

replication_factor uint32

replication_factor ...

ServerSignatureRequest

ServerSignatureRequest is the request for the ServerSignature RPC.

ServerSignatureResponse

ServerSignatureResponse is the response for the ServerSignature RPC.

FieldTypeLabelDescription
public_key bytes

public_key is the string with a content of the public key.

ServerService

ServerService is a service that provides information about a Gitaly server.

Method NameRequest TypeResponse TypeDescription
ServerInfo ServerInfoRequest ServerInfoResponse

ServerInfo ...

DiskStatistics DiskStatisticsRequest DiskStatisticsResponse

DiskStatistics ...

ReadinessCheck ReadinessCheckRequest ReadinessCheckResponse

ReadinessCheck runs the set of the checks to make sure service is in operational state.

ServerSignature ServerSignatureRequest ServerSignatureResponse

ServerSignature returns the contents of the public key used to sign commits made through the GitLab UI or Web IDE. See https://docs.gitlab.com/user/project/repository/signed_commits/#verify-commits-made-in-the-web-ui for more information.

service_config.proto

Top

LoadBalancingConfig

LoadBalancingConfig wraps around the round-robin strategies. Only one strategy can be selected.

FieldTypeLabelDescription
pick_first PickFirstConfig

pick_first strategy

round_robin RoundRobinConfig

round_robin strategy

MethodConfig

MethodConfig is the configuration for a method.

FieldTypeLabelDescription
name MethodConfig.Name repeated

name defines the list of affected services/methods The name should be is the definition of grpc. Nothing we can do about it protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED

wait_for_ready google.protobuf.BoolValue

The following fields are unused by Gitaly at the moment. Please refer to the original documentation for more information protolint:disable FIELDS_HAVE_COMMENT

timeout google.protobuf.Duration

max_request_message_bytes google.protobuf.UInt32Value

max_response_message_bytes google.protobuf.UInt32Value

retry_policy MethodConfig.RetryPolicy

retry_policy defines the exponential backoff configuration for the affected services/methods protolint:enable FIELDS_HAVE_COMMENT

MethodConfig.Name

Name is an object indicating which services/methods being affected by the config

FieldTypeLabelDescription
service string

service is name of the service,including its package. For example: gitaly.SmartHTTPService

method string

method is the name of the method within the above service. Empty method name implies the method policy is effective for all methods of the service

MethodConfig.RetryPolicy

RetryPolicy defines the configuration for exponential backoff when a request fails

FieldTypeLabelDescription
max_attempts uint32

max_attempts is the total retry attempts client perform before bailing out

initial_backoff google.protobuf.Duration

initial_backoff is the minimum delay for the first retries

max_backoff google.protobuf.Duration

max_backoff is the minimum delay

backoff_multiplier float

backoff_multiplier is the factor determining "how fast" the delay increases after each retry

retryable_status_codes string repeated

retryable_status_codes defines the list of eligible status codes. The status must be in capitalized snake_case form. For example, UNAVAILABLE, FAILED_PRECONDITION

PickFirstConfig

PickFirstConfig signals the pick_first load-balancing strategy. This strategy is the default

strategy of grpc client libraries so that the connection has only one subchannel, which is the

first address after resolution

RoundRobinConfig

RoundRobinConfig indicates the round_robin strategy. This strategy distributes the incoming

requests to active subchannels in a round-robin fashion.

ServiceConfig

ServiceConfig defines the configuration that allows service owners to publish parameters to be

automatically used by all clients of their service. gRPC doesn't export this protobuf. So, we

built a minimized version to for Gitaly use. The completed version is defined at

https://github.com/grpc/grpc-proto/blob/master/grpc/service_config/service_config.proto

FieldTypeLabelDescription
load_balancing_config LoadBalancingConfig repeated

load_balancing_config ... protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED

method_config MethodConfig repeated

method_config ... protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED

shared.proto

Top

Branch

Branch corresponds to Gitlab::Git::Branch

FieldTypeLabelDescription
name bytes

name ...

target_commit GitCommit

target_commit ...

CommitAuthor

CommitAuthor ...

FieldTypeLabelDescription
name bytes

name ...

email bytes

email ...

date google.protobuf.Timestamp

date ...

timezone bytes

timezone ...

CommitStatInfo

CommitStatInfo includes the number of changed lines and files in the commit.

FieldTypeLabelDescription
additions int32

additions is the number of line additions in the commit.

deletions int32

deletions is the number of lines deleted in the commit.

changed_files int32

changed_files is the number of files changed in the commit.

CommitTrailer

CommitTrailer is a single Git trailer (https://git-scm.com/docs/git-interpret-trailers)

key-value pair.

FieldTypeLabelDescription
key bytes

key is the key of the trailer, such as `Signed-off-by`.

value bytes

value is the value of the trailer, such as `Alice <alice@gmail.com>`.

ExitStatus

ExitStatus ...

FieldTypeLabelDescription
value int32

value ...

GitCommit

GitCommit corresponds to Gitlab::Git::Commit

FieldTypeLabelDescription
id string

id ...

subject bytes

subject ...

body bytes

body ...

author CommitAuthor

author ...

committer CommitAuthor

committer ...

parent_ids string repeated

parent_ids ...

body_size int64

body_size is the size of the commit body. If body exceeds a certain threshold, it will be nullified, but its size will be set in body_size so we can know if a commit had a body in the first place.

signature_type SignatureType

signature_type ...

tree_id string

tree_id is the object ID of the tree. The tree ID will always be filled, even if the tree is empty. In that case the value will be `4b825dc642cb6eb9a060e54bf8d69288fbee4904`. That value is equivalent to `git hash-object -t tree /dev/null`.

trailers CommitTrailer repeated

trailers is the list of Git trailers (https://git-scm.com/docs/git-interpret-trailers) found in this commit's message. The number of trailers and their key/value sizes are limited. If a trailer exceeds these size limits, it and any trailers that follow it are not included.

short_stats CommitStatInfo

short_stats are the git stats including additions, deletions and changed_files, they are only set when `include_shortstat == true`.

referenced_by bytes repeated

referenced_by contains fully-qualified reference names (e.g refs/heads/main) that point to the commit. protolint:disable:this REPEATED_FIELD_NAMES_PLURALIZED

encoding string

encoding is the encoding of the commit message. This field will only be present if `i18n.commitEncoding` was set to a value other than "UTF-8" at the time this commit was made. See: https://git-scm.com/docs/git-commit#_discussion

GlobalOptions

GlobalOptions are additional git options as defined at https://git-scm.com/docs/git/#_options.

FieldTypeLabelDescription
literal_pathspecs bool

literal_pathspecs should be set to treat pathspecs literally (i.e. no globbing, no pathspec magic).

ObjectPool

ObjectPool ...

FieldTypeLabelDescription
repository Repository

repository ...

PaginationCursor

PaginationCursor defines the page token clients should use to fetch the next page.

FieldTypeLabelDescription
next_cursor string

next_cursor is an opaque token provided to the caller to indicate what the caller should present as a page_token to get subsequent results.

PaginationParameter

PaginationParameter controls pagination within RPCs.

FieldTypeLabelDescription
page_token string

page_token instructs pagination to start sending results after the provided page token appears. A page token allows for a generic pattern to uniquely identify a result or 'page'. Each paginated RPC may interpret a page token differently.

limit int32

limit is the maximum number of objects the client will receive. When fully consuming the response the client will receive _at most_ `limit` number of resulting objects. Note that the number of response messages might be much lower, as some response messages already send multiple objects per message. When the limit is smaller than 0, it will be normalized to 2147483647 on the server side. When limit is not set, it defaults to 0, and no results are send in the response.

Partition

Partition represents storage partition

FieldTypeLabelDescription
id string

id is the identifier of a partition within the storage

Repository

Repository ...

FieldTypeLabelDescription
storage_name string

storage_name ...

relative_path string

relative_path ...

git_object_directory string

git_object_directory sets the GIT_OBJECT_DIRECTORY envvar on git commands to the value of this field. It influences the object storage directory the SHA1 directories are created underneath.

git_alternate_object_directories string repeated

git_alternate_object_directories sets the GIT_ALTERNATE_OBJECT_DIRECTORIES envvar on git commands to the values of this field. It influences the list of Git object directories which can be used to search for Git objects.

gl_repository string

gl_repository is used in callbacks to GitLab so that it knows what repository the event is associated with. May be left empty on RPC's that do not perform callbacks. During project creation, `gl_repository` may not be known.

gl_project_path string

gl_project_path is the human-readable GitLab project path (e.g. gitlab-org/gitlab-ce). When hashed storage is use, this associates a project path with its path on disk. The name can change over time (e.g. when a project is renamed). This is primarily used for logging/debugging at the moment.

Tag

Tag ...

FieldTypeLabelDescription
name bytes

name ...

id string

id ...

target_commit GitCommit

target_commit ...

message bytes

message is the message of the tag. If message exceeds a certain threshold, it will be nullified, but its size will be set in message_size so we can know if a tag had a message in the first place.

message_size int64

message_size ...

tagger CommitAuthor

tagger ...

signature_type SignatureType

signature_type ...

User

User ...

FieldTypeLabelDescription
gl_id string

gl_id ...

name bytes

name ...

email bytes

email ...

gl_username string

gl_username ...

timezone string

timezone is the timezone as configured by the user in the web interface. This timezone may be used when new commits are created via RPC calls.

ObjectFormat

ObjectFormat is the object format that a Git repository can use.

NameNumberDescription
OBJECT_FORMAT_UNSPECIFIED 0

OBJECT_FORMAT_UNSPECIFIED is the default object type when it has not been explicitly requested by the client. Defaults to OBJECT_FORMAT_SHA1.

OBJECT_FORMAT_SHA1 1

OBJECT_FORMAT_SHA1 is the object format based on the SHA1 hash.

OBJECT_FORMAT_SHA256 2

OBJECT_FORMAT_SHA256 is the object format based on the SHA256 hash. This is experimental.

ObjectType

ObjectType ...

NameNumberDescription
UNKNOWN 0

UNKNOWN ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

COMMIT 1

COMMIT ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

BLOB 2

BLOB ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

TREE 3

TREE ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

TAG 4

TAG ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

SignatureType

SignatureType ...

NameNumberDescription
NONE 0

NONE ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

PGP 1

PGP ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

X509 2

X509 ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

SSH 3

SSH ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

SortDirection

SortDirection defines the sort direction.

NameNumberDescription
ASCENDING 0

ASCENDING sorts by the sort key in ascending order. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

DESCENDING 1

DESCENDING sorts by the sort key in descending order. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

smarthttp.proto

Top

InfoRefsRequest

InfoRefsRequest is a request for the InfoRefsUploadPack and InfoRefsUploadPack rpcs.

FieldTypeLabelDescription
repository Repository

repository is the repository on which to operate.

git_config_options string repeated

git_config_options are parameters to use with git -c (key=value pairs).

git_protocol string

git_protocol is the git protocol version.

InfoRefsResponse

InfoRefsResponse is the response of InfoRefsUploadPack and InfoRefsUploadPack rpcs.

It is used to provide the client with the servers advertised refs.

FieldTypeLabelDescription
data bytes

data is the raw data copied from the stdout of git-upload-pack(1) or git-receive-pack(1) when used with the `--advertise-refs` flag.

PostReceivePackRequest

PostReceivePackRequest is the request for the PostReceivePack rpc. It is a stream used to

transfer the raw data from the client to the servers stdin of git-receive-pack(1) process.

FieldTypeLabelDescription
repository Repository

repository is the repository on which to operate. It should only be present in the first message of the stream.

data bytes

data is the raw data to be copied to stdin of 'git receive-pack'.

gl_id string

gl_id is the GitLab ID of the user. This is used by Git {pre,post}-receive hooks. It should only be present in the first message of the stream.

gl_repository string

gl_repository refers to the GitLab repository. This is used by Git {pre,post}-receive hooks. It should only be present in the first message of the stream.

gl_username string

gl_username is the GitLab Username of the user. This is used by Git {pre,post}-receive hooks. It should only be present in the first message of the stream.

git_protocol string

git_protocol is the git protocol version.

git_config_options string repeated

git_config_options are parameters to use with git -c (key=value pairs).

PostReceivePackResponse

PostReceivePackResponse is the response for the PostReceivePack rpc. It is a stream used to

transfer the raw data from the stdout of git-receive-pack(1) from the server to the client.

FieldTypeLabelDescription
data bytes

data is the raw data from the stdout of 'git receive-pack'.

PostUploadPackWithSidechannelRequest

PostUploadPackWithSidechannelRequest is the request for the PostUploadPackWithSidechannel rpc.

FieldTypeLabelDescription
repository Repository

repository is the repository on which to operate.

git_config_options string repeated

git_config_options are parameters to use with git -c (key=value pairs).

git_protocol string

git_protocol is the git protocol version.

PostUploadPackWithSidechannelResponse

PostUploadPackWithSidechannelResponse is the response for the PostUploadPackWithSidechannel rpc.

This is an empty response since the raw data is transferred to the client via the sidechannel

exclusively.

FieldTypeLabelDescription
packfile_negotiation_statistics PackfileNegotiationStatistics

packfile_negotiation_statistics is the packfile negotiation statistics.

SmartHTTPService

SmartHTTPService is a service that provides RPCs required for HTTP-based Git

clones via the smart HTTP protocol.

Method NameRequest TypeResponse TypeDescription
InfoRefsUploadPack InfoRefsRequest InfoRefsResponse stream

InfoRefsUploadPack provides the response for GET /info/refs?service=git-upload-pack. It is invoked when the client fetches packs from the server, meaning the server will upload the packs to that client. The client doesn't upload new objects. This is used to advertise the references available on the server to the client via git-upload-pack(1)'s `--advertise-refs` option.

InfoRefsReceivePack InfoRefsRequest InfoRefsResponse stream

InfoRefsReceivePack provides the response for GET /info/refs?service=git-receive-pack. It is invoked when the client pushes packs to the server, meaning the server will fetch the packs from the client. This is used to advertise the references available on the server to the client via git-receive-pack(1)'s `--advertise-refs` option.

PostUploadPackWithSidechannel PostUploadPackWithSidechannelRequest PostUploadPackWithSidechannelResponse

PostUploadPackWithSidechannel provides the response for POST /upload-pack. It used to transfer pack files from the server to the client via sidechannels. This is invoked when the client executes `git fetch`. More info on sidechannels: https://gitlab.com/gitlab-org/gitaly/-/blob/master/doc/sidechannel.md

PostReceivePack PostReceivePackRequest stream PostReceivePackResponse stream

PostReceivePack provides the response for POST /receive-pack. It used to transfer pack files from the client to the server. This is invoked when the client executes `git push`.

ssh.proto

Top

SSHReceivePackRequest

SSHReceivePackRequest is a request for the SSHReceivePack RPC. All fields other than stdin must

be set in the first request message. Subsequent requests in the stream must only contain the

stdin field.

FieldTypeLabelDescription
repository Repository

repository is the repository where git-receive-pack(1) is spawned.

stdin bytes

stdin is a chunk of raw data to be copied to git-receive-pack(1) standard input

gl_id string

gl_id is the GitLab ID of the user. This is used by Git {pre,post}-receive hooks.

gl_repository string

gl_repository refers to the GitLab repository. This is used by Git {pre,post}-receive hooks.

gl_username string

gl_username is the GitLab Username of the user. This is used by Git {pre,post}-receive hooks.

git_protocol string

git_protocol is the git protocol version.

git_config_options string repeated

git_config_options are parameters to use with git -c (key=value pairs).

SSHReceivePackResponse

SSHReceivePackResponse is a response for the SSHReceivePack RPC. Responses are stream back to

clients in chunks containing the stdout and stderr from git-receive-pack(1).

FieldTypeLabelDescription
stdout bytes

stdout is a chunk of raw data from git-receive-pack(1) standard output.

stderr bytes

stderr is a chunk of raw data from git-receive-pack(1) standard error.

exit_status ExitStatus

exit_status is the exit status when the command has finished. This field may be nil. This is intentional.

SSHUploadArchiveRequest

SSHUploadArchiveRequest is a request for the SSHUploadArchive RPC. The first request of the

stream must only contain repository. All subsequent requests must only contain stdin data.

FieldTypeLabelDescription
repository Repository

repository is the repository where git-upload-archive(1) is spawned.

stdin bytes

stdin is a chunk of raw data to be copied to git-upload-archive(1) standard input.

SSHUploadArchiveResponse

SSHUploadArchiveResponse is a response for the SSHUploadArchive RPC. Responses are stream back to

clients in chunks containing the stdout and stderr from git-upload-archive(1).

FieldTypeLabelDescription
stdout bytes

stdout is a chunk of raw data from git-upload-archive(1) standard output.

stderr bytes

stderr is a chunk of raw data from git-upload-archive(1) standard error.

exit_status ExitStatus

exit_status is the exit status when the command has finished. This field may be nil. This is intentional.

SSHUploadPackWithSidechannelRequest

SSHUploadPackWithSidechannelRequest is a request for the SSHUploadPackWithSidechannel RPC.

FieldTypeLabelDescription
repository Repository

repository is the repository where git-upload-pack(1) is spawned.

git_config_options string repeated

git_config_options are parameters to use with git -c (key=value pairs).

git_protocol string

git_protocol is the git protocol version.

SSHUploadPackWithSidechannelResponse

SSHUploadPackWithSidechannelResponse is a response for the SSHUploadPackWithSidechannel RPC.

FieldTypeLabelDescription
packfile_negotiation_statistics PackfileNegotiationStatistics

packfile_negotiation_statistics is the packfile negotiation statistics.

SSHService

SSHService is a service that provides RPCs required for SSH-based Git clones.

Method NameRequest TypeResponse TypeDescription
SSHUploadPackWithSidechannel SSHUploadPackWithSidechannelRequest SSHUploadPackWithSidechannelResponse

SSHUploadPackWithSidechannel is an RPC to forward git-upload-pack(1) to Gitaly for SSH sessions, via sidechannels. Sidechannel connections sidestep gRPC Protobuf message overhead and allow higher throughput of bulk data transfers. The stdin, stdout, and stderr for the git-upload-pack(1) are streamed through the sidechannel connection.

SSHReceivePack SSHReceivePackRequest stream SSHReceivePackResponse stream

SSHReceivePack is an RPC to forward git-receive-pack(1) to Gitaly for SSH sessions. The RPC uses bidirectional streaming so the client can stream stdin and the server can stream stdout and stderr for git-receive-pack(1).

SSHUploadArchive SSHUploadArchiveRequest stream SSHUploadArchiveResponse stream

SSHUploadArchive is an RPC to forward git-upload-archive(1) to Gitaly for SSH sessions. The RPC uses bidirectional streaming so the client can stream stdin and the server can stream stdout and stderr for git-upload-archive(1).

transaction.proto

Top

StopTransactionRequest

StopTransactionRequest ...

FieldTypeLabelDescription
repository Repository

repository ...

transaction_id uint64

transaction_id is the ID of the transaction we're processing.

StopTransactionResponse

StopTransactionResponse ...

VoteTransactionRequest

VoteTransactionRequest ...

FieldTypeLabelDescription
repository Repository

repository ...

transaction_id uint64

transaction_id is the ID of the transaction we're processing.

node string

node is the name of the Gitaly node that's voting on a transaction.

reference_updates_hash bytes

reference_updates_hash is the SHA1 of the references that are to be updated.

phase VoteTransactionRequest.Phase

phase is the voting phase.

VoteTransactionResponse

VoteTransactionResponse ...

FieldTypeLabelDescription
state VoteTransactionResponse.TransactionState

state ...

VoteTransactionRequest.Phase

Phase ...

NameNumberDescription
UNKNOWN_PHASE 0

UNKNOWN_PHASE is the unknown voting phase. This value has been the default because phases have been introduced. Eventually, using this phase will become unsupported. protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

PREPARED_PHASE 1

PREPARED_PHASE is the prepratory phase. The data that is about to change is locked for concurrent modification, but changes have not yet been written to disk. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

COMMITTED_PHASE 2

COMMITTED_PHASE is the committing phase. Data has been committed to disk and will be visible in all subsequent requests. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

SYNCHRONIZED_PHASE 3

SYNCHRONIZED_PHASE is the synchronizing phase. This is used to synchronize nodes with each other on a specific event. protolint:disable:this ENUM_FIELD_NAMES_PREFIX

VoteTransactionResponse.TransactionState

TransactionState is the outcome of the given transaction telling the client whether the

transaction should be committed or rolled back.

NameNumberDescription
COMMIT 0

COMMIT ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

ABORT 1

ABORT ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

STOP 2

STOP ... protolint:disable:this ENUM_FIELD_NAMES_PREFIX

RefTransaction

RefTransaction is a service which provides RPCs to interact with reference

transactions. Reference transactions are used in the context of Gitaly

Cluster to ensure that all nodes part of a single transaction perform the

same change: given a set of changes, the changes are hashed and the hash is

then voted on.

Method NameRequest TypeResponse TypeDescription
VoteTransaction VoteTransactionRequest VoteTransactionResponse

VoteTransaction casts a vote on a transaction to establish whether the node is doing the same change as all the other nodes part of the transaction. This RPC blocks until quorum has been reached, which may be _before_ all nodes have cast a vote. This RPC may return one of the following error codes: - `NotFound` in case the transaction could not be found. - `Canceled` in case the transaction has been canceled before quorum was reached.

StopTransaction StopTransactionRequest StopTransactionResponse

StopTransaction gracefully stops a transaction. This RPC can be used if only a subset of nodes executes specific code which may cause the transaction to fail. One such example is Git hooks, which only execute on the primary Gitaly noded. Other nodes which vote on this transaction will get a response with the `STOP` state being set. This RPC may return one of the following error codes: - `NotFound` in case the transaction could not be found. - `Canceled` in case the transaction has been canceled before quorum was reached.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)