Protocol Documentation

Table of Contents

blob.proto

Top

GetAllLFSPointersRequest

FieldTypeLabelDescription
repository Repository

revision bytes

GetAllLFSPointersResponse

FieldTypeLabelDescription
lfs_pointers LFSPointer repeated

GetBlobRequest

FieldTypeLabelDescription
repository Repository

oid string

Object ID (SHA1) of the blob we want to get

limit int64

Maximum number of bytes we want to receive. Use '-1' to get the full blob no matter how big.

GetBlobResponse

FieldTypeLabelDescription
size int64

Blob size; present only in first response message

data bytes

Chunk of blob data

oid string

Object ID of the actual blob returned. Empty if no blob was found.

GetBlobsRequest

FieldTypeLabelDescription
repository Repository

revision_paths GetBlobsRequest.RevisionPath repeated

Revision/Path pairs of the blobs we want to get.

limit int64

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

GetBlobsRequest.RevisionPath

FieldTypeLabelDescription
revision string

path bytes

GetBlobsResponse

FieldTypeLabelDescription
size int64

Blob size; present only on the first message per blob

data bytes

Chunk of blob data, could span over multiple messages.

oid string

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

is_submodule bool

mode int32

revision string

path bytes

GetLFSPointersRequest

FieldTypeLabelDescription
repository Repository

blob_ids string repeated

GetLFSPointersResponse

FieldTypeLabelDescription
lfs_pointers LFSPointer repeated

GetNewLFSPointersRequest

FieldTypeLabelDescription
repository Repository

revision bytes

limit int32

not_in_all bool

Note: When `not_in_all` is true, `not_in_refs` is ignored

not_in_refs bytes repeated

GetNewLFSPointersResponse

FieldTypeLabelDescription
lfs_pointers LFSPointer repeated

LFSPointer

FieldTypeLabelDescription
size int64

data bytes

oid string

NewBlobObject

FieldTypeLabelDescription
size int64

oid string

path bytes

BlobService

Method NameRequest TypeResponse TypeDescription
GetBlob GetBlobRequest GetBlobResponse

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

GetLFSPointers GetLFSPointersRequest GetLFSPointersResponse

GetNewLFSPointers GetNewLFSPointersRequest GetNewLFSPointersResponse

GetAllLFSPointers GetAllLFSPointersRequest GetAllLFSPointersResponse

cleanup.proto

Top

ApplyBfgObjectMapRequest

FieldTypeLabelDescription
repository Repository

object_map bytes

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.

ApplyBfgObjectMapResponse

ApplyBfgObjectMapStreamRequest

FieldTypeLabelDescription
repository Repository

Only available on the first message

object_map bytes

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

FieldTypeLabelDescription
entries ApplyBfgObjectMapStreamResponse.Entry repeated

ApplyBfgObjectMapStreamResponse.Entry

We send back each parsed entry in the request's object map so the client

can take action

FieldTypeLabelDescription
type ObjectType

old_oid string

new_oid string

CloseSessionRequest

FieldTypeLabelDescription
session_id string

CloseSessionResponse

CleanupService

Method NameRequest TypeResponse TypeDescription
ApplyBfgObjectMap ApplyBfgObjectMapRequest ApplyBfgObjectMapResponse

Deprecated in favour of ApplyBfgObjectMapStream

ApplyBfgObjectMapStream ApplyBfgObjectMapStreamRequest ApplyBfgObjectMapStreamResponse

CloseSession CloseSessionRequest CloseSessionResponse

commit.proto

Top

CommitIsAncestorRequest

FieldTypeLabelDescription
repository Repository

ancestor_id string

child_id string

CommitIsAncestorResponse

FieldTypeLabelDescription
value bool

CommitLanguagesRequest

FieldTypeLabelDescription
repository Repository

revision bytes

CommitLanguagesResponse

FieldTypeLabelDescription
languages CommitLanguagesResponse.Language repeated

CommitLanguagesResponse.Language

FieldTypeLabelDescription
name string

share float

color string

CommitStatsRequest

FieldTypeLabelDescription
repository Repository

revision bytes

CommitStatsResponse

FieldTypeLabelDescription
oid string

OID is the commit. Empty means not found

additions int32

deletions int32

CommitsBetweenRequest

FieldTypeLabelDescription
repository Repository

from bytes

to bytes

CommitsBetweenResponse

FieldTypeLabelDescription
commits GitCommit repeated

CommitsByMessageRequest

FieldTypeLabelDescription
repository Repository

revision bytes

offset int32

limit int32

path bytes

query string

CommitsByMessageResponse

One 'page' of the paginated response of CommitsByMessage

FieldTypeLabelDescription
commits GitCommit repeated

CountCommitsRequest

FieldTypeLabelDescription
repository Repository

revision bytes

after google.protobuf.Timestamp

before google.protobuf.Timestamp

path bytes

max_count int32

all bool

all and revision are mutually exclusive

CountCommitsResponse

FieldTypeLabelDescription
count int32

CountDivergingCommitsRequest

FieldTypeLabelDescription
repository Repository

from bytes

to bytes

max_count int32

CountDivergingCommitsResponse

FieldTypeLabelDescription
left_count int32

right_count int32

ExtractCommitSignatureRequest

FieldTypeLabelDescription
repository Repository

commit_id string

ExtractCommitSignatureResponse

Either of the 'signature' and 'signed_text' fields may be present. It

is up to the caller to stitch them together.

FieldTypeLabelDescription
signature bytes

signed_text bytes

FilterShasWithSignaturesRequest

FieldTypeLabelDescription
repository Repository

shas bytes repeated

FilterShasWithSignaturesResponse

FieldTypeLabelDescription
shas bytes repeated

FindAllCommitsRequest

FieldTypeLabelDescription
repository Repository

revision bytes

When nil, return all commits reachable by any branch in the repo

max_count int32

skip int32

order FindAllCommitsRequest.Order

FindAllCommitsResponse

A single 'page' of the result set

FieldTypeLabelDescription
commits GitCommit repeated

FindCommitRequest

FieldTypeLabelDescription
repository Repository

revision bytes

FindCommitResponse

FieldTypeLabelDescription
commit GitCommit

commit is nil when the commit was not found

FindCommitsRequest

FieldTypeLabelDescription
repository Repository

revision bytes

limit int32

offset int32

paths bytes repeated

follow bool

skip_merges bool

disable_walk bool

after google.protobuf.Timestamp

before google.protobuf.Timestamp

all bool

all and revision are mutually exclusive

FindCommitsResponse

A single 'page' of the result set

FieldTypeLabelDescription
commits GitCommit repeated

GetCommitMessagesRequest

FieldTypeLabelDescription
repository Repository

commit_ids string repeated

GetCommitMessagesResponse

FieldTypeLabelDescription
commit_id string

Only present for a new commit message

message bytes

GetCommitSignaturesRequest

FieldTypeLabelDescription
repository Repository

commit_ids string repeated

GetCommitSignaturesResponse

FieldTypeLabelDescription
commit_id string

Only present for a new commit signature data.

signature bytes

See ExtractCommitSignatureResponse above for how these fields should be handled.

signed_text bytes

GetTreeEntriesRequest

FieldTypeLabelDescription
repository Repository

revision bytes

path bytes

recursive bool

GetTreeEntriesResponse

FieldTypeLabelDescription
entries TreeEntry repeated

LastCommitForPathRequest

FieldTypeLabelDescription
repository Repository

revision bytes

path bytes

LastCommitForPathResponse

FieldTypeLabelDescription
commit GitCommit

commit is nil when the commit was not found

ListCommitsByOidRequest

FieldTypeLabelDescription
repository Repository

oid string repeated

ListCommitsByOidResponse

FieldTypeLabelDescription
commits GitCommit repeated

ListCommitsByRefNameRequest

FieldTypeLabelDescription
repository Repository

ref_names bytes repeated

ListCommitsByRefNameResponse

FieldTypeLabelDescription
commits GitCommit repeated

ListFilesRequest

FieldTypeLabelDescription
repository Repository

revision bytes

ListFilesResponse

A single 'page' of the paginated response

FieldTypeLabelDescription
paths bytes repeated

Remember to force encoding utf-8 on the client side

ListLastCommitsForTreeRequest

FieldTypeLabelDescription
repository Repository

revision string

path bytes

limit int32

limit == -1 will get the last commit for all paths

offset int32

ListLastCommitsForTreeResponse

FieldTypeLabelDescription
commits ListLastCommitsForTreeResponse.CommitForTree repeated

ListLastCommitsForTreeResponse.CommitForTree

FieldTypeLabelDescription
commit GitCommit

path_bytes bytes

RawBlameRequest

FieldTypeLabelDescription
repository Repository

revision bytes

path bytes

RawBlameResponse

FieldTypeLabelDescription
data bytes

TreeEntry

FieldTypeLabelDescription
oid string

OID of the object this tree entry points to

root_oid string

OID of the tree attached to commit_oid

path bytes

Path relative to repository root

type TreeEntry.EntryType

mode int32

File mode e.g. 0644

commit_oid string

The commit object via which this entry was retrieved

flat_path bytes

Relative path of the first subdir that doesn't have only one directory descendant

TreeEntryRequest

FieldTypeLabelDescription
repository Repository

revision bytes

commit ID or refname

path bytes

entry path relative to repository root

limit int64

TreeEntryResponse

FieldTypeLabelDescription
type TreeEntryResponse.ObjectType

oid string

SHA1 object ID

size int64

mode int32

file mode

data bytes

raw object contents

FindAllCommitsRequest.Order

NameNumberDescription
NONE 0

TOPO 1

DATE 2

TreeEntry.EntryType

TODO: Replace this enum with ObjectType in shared.proto

NameNumberDescription
BLOB 0

TREE 1

COMMIT 3

TreeEntryResponse.ObjectType

TODO: Replace this enum with ObjectType in shared.proto

NameNumberDescription
COMMIT 0

BLOB 1

TREE 2

TAG 3

CommitService

Method NameRequest TypeResponse TypeDescription
CommitIsAncestor CommitIsAncestorRequest CommitIsAncestorResponse

TreeEntry TreeEntryRequest TreeEntryResponse

CommitsBetween CommitsBetweenRequest CommitsBetweenResponse

CountCommits CountCommitsRequest CountCommitsResponse

CountDivergingCommits CountDivergingCommitsRequest CountDivergingCommitsResponse

GetTreeEntries GetTreeEntriesRequest GetTreeEntriesResponse

ListFiles ListFilesRequest ListFilesResponse

FindCommit FindCommitRequest FindCommitResponse

CommitStats CommitStatsRequest CommitStatsResponse

FindAllCommits FindAllCommitsRequest FindAllCommitsResponse

Use a stream to paginate the result set

FindCommits FindCommitsRequest FindCommitsResponse

CommitLanguages CommitLanguagesRequest CommitLanguagesResponse

RawBlame RawBlameRequest RawBlameResponse

LastCommitForPath LastCommitForPathRequest LastCommitForPathResponse

ListLastCommitsForTree ListLastCommitsForTreeRequest ListLastCommitsForTreeResponse

CommitsByMessage CommitsByMessageRequest CommitsByMessageResponse

ListCommitsByOid ListCommitsByOidRequest ListCommitsByOidResponse

ListCommitsByRefName ListCommitsByRefNameRequest ListCommitsByRefNameResponse

FilterShasWithSignatures FilterShasWithSignaturesRequest FilterShasWithSignaturesResponse

ExtractCommitSignature ExtractCommitSignatureRequest ExtractCommitSignatureResponse

ExtractCommitSignature returns a stream because the signed text may be arbitrarily large and signature verification is impossible without the full text.

GetCommitSignatures GetCommitSignaturesRequest GetCommitSignaturesResponse

GetCommitMessages GetCommitMessagesRequest GetCommitMessagesResponse

conflicts.proto

Top

ConflictFile

FieldTypeLabelDescription
header ConflictFileHeader

content bytes

ConflictFileHeader

FieldTypeLabelDescription
repository Repository

commit_oid string

their_path bytes

our_path bytes

our_mode int32

ListConflictFilesRequest

FieldTypeLabelDescription
repository Repository

our_commit_oid string

their_commit_oid string

ListConflictFilesResponse

FieldTypeLabelDescription
files ConflictFile repeated

ResolveConflictsRequest

FieldTypeLabelDescription
header ResolveConflictsRequestHeader

files_json bytes

ResolveConflictsRequestHeader

FieldTypeLabelDescription
repository Repository

our_commit_oid string

target_repository Repository

their_commit_oid string

source_branch bytes

target_branch bytes

commit_message bytes

user User

ResolveConflictsResponse

FieldTypeLabelDescription
resolution_error string

ConflictsService

Method NameRequest TypeResponse TypeDescription
ListConflictFiles ListConflictFilesRequest ListConflictFilesResponse

ResolveConflicts ResolveConflictsRequest ResolveConflictsResponse

diff.proto

Top

CommitDelta

FieldTypeLabelDescription
from_path bytes

to_path bytes

from_id string

Blob ID as returned via `git diff --full-index`

to_id string

old_mode int32

new_mode int32

CommitDeltaRequest

FieldTypeLabelDescription
repository Repository

left_commit_id string

right_commit_id string

paths bytes repeated

CommitDeltaResponse

FieldTypeLabelDescription
deltas CommitDelta repeated

CommitDiffRequest

FieldTypeLabelDescription
repository Repository

left_commit_id string

right_commit_id string

ignore_whitespace_change bool

paths bytes repeated

collapse_diffs bool

enforce_limits bool

max_files int32

These limits are only enforced when enforce_limits == true.

max_lines int32

max_bytes int32

max_patch_bytes int32

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

These limits are only enforced if collapse_diffs == true.

safe_max_lines int32

safe_max_bytes int32

CommitDiffResponse

A CommitDiffResponse corresponds to a single changed file in a commit.

FieldTypeLabelDescription
from_path bytes

to_path bytes

from_id string

Blob ID as returned via `git diff --full-index`

to_id string

old_mode int32

new_mode int32

binary bool

raw_patch_data bytes

end_of_patch bool

overflow_marker bool

Indicates the diff file at which we overflow according to the limitations sent, in which case only this attribute will be set.

collapsed bool

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

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

CommitPatchRequest

FieldTypeLabelDescription
repository Repository

revision bytes

CommitPatchResponse

FieldTypeLabelDescription
data bytes

DiffStats

FieldTypeLabelDescription
path bytes

additions int32

deletions int32

DiffStatsRequest

FieldTypeLabelDescription
repository Repository

left_commit_id string

right_commit_id string

DiffStatsResponse

FieldTypeLabelDescription
stats DiffStats repeated

RawDiffRequest

FieldTypeLabelDescription
repository Repository

left_commit_id string

right_commit_id string

RawDiffResponse

FieldTypeLabelDescription
data bytes

RawPatchRequest

FieldTypeLabelDescription
repository Repository

left_commit_id string

right_commit_id string

RawPatchResponse

FieldTypeLabelDescription
data bytes

DiffService

Method NameRequest TypeResponse TypeDescription
CommitDiff CommitDiffRequest CommitDiffResponse

Returns stream of CommitDiffResponse with patches chunked over messages

CommitDelta CommitDeltaRequest CommitDeltaResponse

Return a stream so we can divide the response in chunks of deltas

CommitPatch CommitPatchRequest CommitPatchResponse

RawDiff RawDiffRequest RawDiffResponse

RawPatch RawPatchRequest RawPatchResponse

DiffStats DiffStatsRequest DiffStatsResponse

namespace.proto

Top

AddNamespaceRequest

FieldTypeLabelDescription
storage_name string

name string

AddNamespaceResponse

NamespaceExistsRequest

FieldTypeLabelDescription
storage_name string

name string

NamespaceExistsResponse

FieldTypeLabelDescription
exists bool

RemoveNamespaceRequest

FieldTypeLabelDescription
storage_name string

name string

RemoveNamespaceResponse

RenameNamespaceRequest

FieldTypeLabelDescription
storage_name string

from string

to string

RenameNamespaceResponse

NamespaceService

Method NameRequest TypeResponse TypeDescription
AddNamespace AddNamespaceRequest AddNamespaceResponse

RemoveNamespace RemoveNamespaceRequest RemoveNamespaceResponse

RenameNamespace RenameNamespaceRequest RenameNamespaceResponse

NamespaceExists NamespaceExistsRequest NamespaceExistsResponse

objectpool.proto

Top

CreateObjectPoolRequest

Creates an object pool from the repository. The client is responsible for

joining this pool later with this repository.

FieldTypeLabelDescription
object_pool ObjectPool

origin Repository

CreateObjectPoolResponse

DeleteObjectPoolRequest

Removes the directory from disk, caller is responsible for leaving the object

pool before calling this RPC

FieldTypeLabelDescription
object_pool ObjectPool

DeleteObjectPoolResponse

DisconnectGitAlternatesRequest

FieldTypeLabelDescription
repository Repository

DisconnectGitAlternatesResponse

FetchIntoObjectPoolRequest

FieldTypeLabelDescription
origin Repository

object_pool ObjectPool

repack bool

FetchIntoObjectPoolResponse

LinkRepositoryToObjectPoolRequest

FieldTypeLabelDescription
object_pool ObjectPool

repository Repository

LinkRepositoryToObjectPoolResponse

ReduplicateRepositoryRequest

FieldTypeLabelDescription
repository Repository

ReduplicateRepositoryResponse

UnlinkRepositoryFromObjectPoolRequest

This RPC doesn't require the ObjectPool as it will remove the alternates file

from the pool participant. The caller is responsible no data loss occurs.

FieldTypeLabelDescription
repository Repository

object_pool ObjectPool

UnlinkRepositoryFromObjectPoolResponse

ObjectPoolService

Method NameRequest TypeResponse TypeDescription
CreateObjectPool CreateObjectPoolRequest CreateObjectPoolResponse

DeleteObjectPool DeleteObjectPoolRequest DeleteObjectPoolResponse

LinkRepositoryToObjectPool LinkRepositoryToObjectPoolRequest LinkRepositoryToObjectPoolResponse

Repositories are assumed to be stored on the same disk

UnlinkRepositoryFromObjectPool UnlinkRepositoryFromObjectPoolRequest UnlinkRepositoryFromObjectPoolResponse

ReduplicateRepository ReduplicateRepositoryRequest ReduplicateRepositoryResponse

DisconnectGitAlternates DisconnectGitAlternatesRequest DisconnectGitAlternatesResponse

FetchIntoObjectPool FetchIntoObjectPoolRequest FetchIntoObjectPoolResponse

operations.proto

Top

OperationBranchUpdate

FieldTypeLabelDescription
commit_id string

If this string is non-empty the branch has been updated.

repo_created bool

Used for cache invalidation in GitLab

branch_created bool

Used for cache invalidation in GitLab

UserApplyPatchRequest

FieldTypeLabelDescription
header UserApplyPatchRequest.Header

patches bytes

UserApplyPatchRequest.Header

FieldTypeLabelDescription
repository Repository

user User

target_branch bytes

UserApplyPatchResponse

FieldTypeLabelDescription
branch_update OperationBranchUpdate

UserCherryPickRequest

FieldTypeLabelDescription
repository Repository

user User

commit GitCommit

branch_name bytes

message bytes

start_branch_name bytes

start_repository Repository

UserCherryPickResponse

FieldTypeLabelDescription
branch_update OperationBranchUpdate

create_tree_error string

commit_error string

pre_receive_error string

UserCommitFilesAction

FieldTypeLabelDescription
header UserCommitFilesActionHeader

content bytes

UserCommitFilesActionHeader

FieldTypeLabelDescription
action UserCommitFilesActionHeader.ActionType

file_path bytes

previous_path bytes

base64_content bool

execute_filemode bool

infer_content bool

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

UserCommitFilesRequest

FieldTypeLabelDescription
header UserCommitFilesRequestHeader

For each request stream there should be first a request with a header and then n requests with actions

action UserCommitFilesAction

UserCommitFilesRequestHeader

FieldTypeLabelDescription
repository Repository

user User

branch_name bytes

commit_message bytes

commit_author_name bytes

commit_author_email bytes

start_branch_name bytes

start_repository Repository

force bool

start_sha string

UserCommitFilesResponse

FieldTypeLabelDescription
branch_update OperationBranchUpdate

index_error string

pre_receive_error string

UserCreateBranchRequest

FieldTypeLabelDescription
repository Repository

branch_name bytes

user User

start_point bytes

UserCreateBranchResponse

FieldTypeLabelDescription
branch Branch

pre_receive_error string

Error returned by the pre-receive hook. If no error was thrown, it's the empty string ("")

UserCreateTagRequest

FieldTypeLabelDescription
repository Repository

tag_name bytes

user User

target_revision bytes

message bytes

UserCreateTagResponse

FieldTypeLabelDescription
tag Tag

exists bool

pre_receive_error string

UserDeleteBranchRequest

FieldTypeLabelDescription
repository Repository

branch_name bytes

user User

UserDeleteBranchResponse

FieldTypeLabelDescription
pre_receive_error string

UserDeleteTagRequest

FieldTypeLabelDescription
repository Repository

tag_name bytes

user User

UserDeleteTagResponse

FieldTypeLabelDescription
pre_receive_error string

UserFFBranchRequest

FieldTypeLabelDescription
repository Repository

user User

commit_id string

branch bytes

UserFFBranchResponse

FieldTypeLabelDescription
branch_update OperationBranchUpdate

pre_receive_error string

UserMergeBranchRequest

FieldTypeLabelDescription
repository Repository

First message

user User

commit_id string

branch bytes

message bytes

apply bool

Second message Tell the server to apply the merge to the branch

UserMergeBranchResponse

FieldTypeLabelDescription
commit_id string

First message The merge commit the branch will be updated to. The caller can still abort the merge.

branch_update OperationBranchUpdate

Second message If set, the merge has been applied to the branch.

pre_receive_error string

UserMergeToRefRequest

FieldTypeLabelDescription
repository Repository

UserMergeRef 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.

user User

source_sha string

branch bytes

branch is deprecated in favor of `first_parent_ref`.

target_ref bytes

message bytes

first_parent_ref bytes

UserMergeToRefResponse

FieldTypeLabelDescription
commit_id string

pre_receive_error string

UserRebaseConfirmableRequest

FieldTypeLabelDescription
header UserRebaseConfirmableRequest.Header

For each request stream there must be first a request with a header containing details about the rebase to perform.

apply bool

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

UserRebaseConfirmableRequest.Header

FieldTypeLabelDescription
repository Repository

user User

rebase_id string

branch bytes

branch_sha string

remote_repository Repository

remote_branch bytes

UserRebaseConfirmableResponse

FieldTypeLabelDescription
rebase_sha string

The first response will contain the rebase commit the branch will be updated to. The caller can still abort the rebase.

rebase_applied bool

The second response confirms that the rebase has been applied to the branch.

pre_receive_error string

git_error string

UserRebaseRequest

DEPRECATED: https://gitlab.com/gitlab-org/gitaly/issues/1628

FieldTypeLabelDescription
repository Repository

user User

rebase_id string

branch bytes

branch_sha string

remote_repository Repository

remote_branch bytes

UserRebaseResponse

DEPRECATED: https://gitlab.com/gitlab-org/gitaly/issues/1628

FieldTypeLabelDescription
rebase_sha string

pre_receive_error string

git_error string

UserRevertRequest

FieldTypeLabelDescription
repository Repository

user User

commit GitCommit

branch_name bytes

message bytes

start_branch_name bytes

start_repository Repository

UserRevertResponse

FieldTypeLabelDescription
branch_update OperationBranchUpdate

create_tree_error string

commit_error string

pre_receive_error string

UserSquashRequest

FieldTypeLabelDescription
repository Repository

user User

squash_id string

branch bytes

start_sha string

end_sha string

author User

commit_message bytes

UserSquashResponse

FieldTypeLabelDescription
squash_sha string

git_error string

UserUpdateBranchRequest

FieldTypeLabelDescription
repository Repository

branch_name bytes

user User

newrev bytes

oldrev bytes

UserUpdateBranchResponse

FieldTypeLabelDescription
pre_receive_error string

UserUpdateSubmoduleRequest

FieldTypeLabelDescription
repository Repository

user User

commit_sha string

branch bytes

submodule bytes

commit_message bytes

UserUpdateSubmoduleResponse

FieldTypeLabelDescription
branch_update OperationBranchUpdate

pre_receive_error string

commit_error string

UserCommitFilesActionHeader.ActionType

NameNumberDescription
CREATE 0

CREATE_DIR 1

UPDATE 2

MOVE 3

DELETE 4

CHMOD 5

OperationService

Method NameRequest TypeResponse TypeDescription
UserCreateBranch UserCreateBranchRequest UserCreateBranchResponse

UserUpdateBranch UserUpdateBranchRequest UserUpdateBranchResponse

UserDeleteBranch UserDeleteBranchRequest UserDeleteBranchResponse

UserCreateTag UserCreateTagRequest UserCreateTagResponse

UserDeleteTag UserDeleteTagRequest UserDeleteTagResponse

UserMergeToRef UserMergeToRefRequest UserMergeToRefResponse

UserMergeBranch UserMergeBranchRequest UserMergeBranchResponse

UserFFBranch UserFFBranchRequest UserFFBranchResponse

UserCherryPick UserCherryPickRequest UserCherryPickResponse

UserCommitFiles UserCommitFilesRequest UserCommitFilesResponse

UserRebase UserRebaseRequest UserRebaseResponse

UserRebaseConfirmable UserRebaseConfirmableRequest UserRebaseConfirmableResponse

UserRevert UserRevertRequest UserRevertResponse

UserSquash UserSquashRequest UserSquashResponse

UserApplyPatch UserApplyPatchRequest UserApplyPatchResponse

UserUpdateSubmodule UserUpdateSubmoduleRequest UserUpdateSubmoduleResponse

ref.proto

Top

CreateBranchRequest

FieldTypeLabelDescription
repository Repository

name bytes

start_point bytes

CreateBranchResponse

FieldTypeLabelDescription
status CreateBranchResponse.Status

branch Branch

DeleteBranchRequest

FieldTypeLabelDescription
repository Repository

name bytes

DeleteBranchResponse

Not clear if we need to do status signaling; we can add fields later.

DeleteRefsRequest

FieldTypeLabelDescription
repository Repository

except_with_prefix bytes repeated

The following two fields are mutually exclusive

refs bytes repeated

DeleteRefsResponse

FieldTypeLabelDescription
git_error string

FindAllBranchNamesRequest

FieldTypeLabelDescription
repository Repository

FindAllBranchNamesResponse

FieldTypeLabelDescription
names bytes repeated

FindAllBranchesRequest

FieldTypeLabelDescription
repository Repository

merged_only bool

Only return branches that are merged into root ref

merged_branches bytes repeated

If merged_only is true, this is a list of branches from which we return those merged into the root ref

FindAllBranchesResponse

FieldTypeLabelDescription
branches FindAllBranchesResponse.Branch repeated

FindAllBranchesResponse.Branch

FieldTypeLabelDescription
name bytes

target GitCommit

FindAllRemoteBranchesRequest

FieldTypeLabelDescription
repository Repository

remote_name string

FindAllRemoteBranchesResponse

FieldTypeLabelDescription
branches Branch repeated

FindAllTagNamesRequest

FieldTypeLabelDescription
repository Repository

FindAllTagNamesResponse

FieldTypeLabelDescription
names bytes repeated

FindAllTagsRequest

FieldTypeLabelDescription
repository Repository

FindAllTagsResponse

FieldTypeLabelDescription
tags Tag repeated

FindBranchRequest

FieldTypeLabelDescription
repository Repository

name bytes

Name can be 'master' but also 'refs/heads/master'

FindBranchResponse

FieldTypeLabelDescription
branch Branch

FindDefaultBranchNameRequest

FieldTypeLabelDescription
repository Repository

FindDefaultBranchNameResponse

FieldTypeLabelDescription
name bytes

FindLocalBranchCommitAuthor

FieldTypeLabelDescription
name bytes

email bytes

date google.protobuf.Timestamp

FindLocalBranchResponse

FieldTypeLabelDescription
name bytes

commit_id string

commit_subject bytes

commit_author FindLocalBranchCommitAuthor

commit_committer FindLocalBranchCommitAuthor

FindLocalBranchesRequest

FieldTypeLabelDescription
repository Repository

sort_by FindLocalBranchesRequest.SortBy

FindLocalBranchesResponse

FieldTypeLabelDescription
branches FindLocalBranchResponse repeated

FindRefNameRequest

FieldTypeLabelDescription
repository Repository

commit_id string

Require that the resulting ref contains this commit as an ancestor

prefix bytes

Example prefix: "refs/heads/". Type bytes because that is the type of ref names.

FindRefNameResponse

FieldTypeLabelDescription
name bytes

Example name: "refs/heads/master". Cannot assume UTF8, so the type is bytes.

GetTagMessagesRequest

FieldTypeLabelDescription
repository Repository

tag_ids string repeated

GetTagMessagesResponse

FieldTypeLabelDescription
message bytes

tag_id string

Only present for a new tag message

ListBranchNamesContainingCommitRequest

FieldTypeLabelDescription
repository Repository

commit_id string

limit uint32

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

ListBranchNamesContainingCommitResponse

FieldTypeLabelDescription
branch_names bytes repeated

ListNewBlobsRequest

FieldTypeLabelDescription
repository Repository

commit_id string

limit uint32

Limit the number of revs to be returned fro mgit-rev-list If the limit is set to zero, all items will be returned

ListNewBlobsResponse

FieldTypeLabelDescription
new_blob_objects NewBlobObject repeated

ListNewCommitsRequest

FieldTypeLabelDescription
repository Repository

commit_id string

ListNewCommitsResponse

FieldTypeLabelDescription
commits GitCommit repeated

ListTagNamesContainingCommitRequest

FieldTypeLabelDescription
repository Repository

commit_id string

limit uint32

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

ListTagNamesContainingCommitResponse

FieldTypeLabelDescription
tag_names bytes repeated

PackRefsRequest

FieldTypeLabelDescription
repository Repository

all_refs bool

PackRefsResponse

RefExistsRequest

FieldTypeLabelDescription
repository Repository

ref bytes

Any ref, e.g. 'refs/heads/master' or 'refs/tags/v1.0.1'. Must start with 'refs/'.

RefExistsResponse

FieldTypeLabelDescription
value bool

CreateBranchResponse.Status

NameNumberDescription
OK 0

ERR_EXISTS 1

ERR_INVALID 2

ERR_INVALID_START_POINT 3

FindLocalBranchesRequest.SortBy

NameNumberDescription
NAME 0

UPDATED_ASC 1

UPDATED_DESC 2

RefService

Method NameRequest TypeResponse TypeDescription
FindDefaultBranchName FindDefaultBranchNameRequest FindDefaultBranchNameResponse

FindAllBranchNames FindAllBranchNamesRequest FindAllBranchNamesResponse

FindAllTagNames FindAllTagNamesRequest FindAllTagNamesResponse

FindRefName FindRefNameRequest FindRefNameResponse

Find a Ref matching the given constraints. Response may be empty.

FindLocalBranches FindLocalBranchesRequest FindLocalBranchesResponse

Return a stream so we can divide the response in chunks of branches

FindAllBranches FindAllBranchesRequest FindAllBranchesResponse

FindAllTags FindAllTagsRequest FindAllTagsResponse

FindAllRemoteBranches FindAllRemoteBranchesRequest FindAllRemoteBranchesResponse

RefExists RefExistsRequest RefExistsResponse

CreateBranch CreateBranchRequest CreateBranchResponse

DeleteBranch DeleteBranchRequest DeleteBranchResponse

FindBranch FindBranchRequest FindBranchResponse

DeleteRefs DeleteRefsRequest DeleteRefsResponse

ListBranchNamesContainingCommit ListBranchNamesContainingCommitRequest ListBranchNamesContainingCommitResponse

ListTagNamesContainingCommit ListTagNamesContainingCommitRequest ListTagNamesContainingCommitResponse

GetTagMessages GetTagMessagesRequest GetTagMessagesResponse

ListNewCommits ListNewCommitsRequest ListNewCommitsResponse

Returns commits that are only reachable from the ref passed

ListNewBlobs ListNewBlobsRequest ListNewBlobsResponse

PackRefs PackRefsRequest PackRefsResponse

remote.proto

Top

AddRemoteRequest

FieldTypeLabelDescription
repository Repository

name string

url string

mirror_refmaps string repeated

If any, the remote is configured as a mirror with those mappings

AddRemoteResponse

FetchInternalRemoteRequest

FieldTypeLabelDescription
repository Repository

remote_repository Repository

FetchInternalRemoteResponse

FieldTypeLabelDescription
result bool

FindRemoteRepositoryRequest

FieldTypeLabelDescription
remote string

FindRemoteRepositoryResponse

This migth throw a GRPC Unavailable code, to signal the request failure

is transient.

FieldTypeLabelDescription
exists bool

FindRemoteRootRefRequest

FieldTypeLabelDescription
repository Repository

remote string

FindRemoteRootRefResponse

FieldTypeLabelDescription
ref string

ListRemotesRequest

FieldTypeLabelDescription
repository Repository

ListRemotesResponse

FieldTypeLabelDescription
remotes ListRemotesResponse.Remote repeated

ListRemotesResponse.Remote

FieldTypeLabelDescription
name string

fetch_url string

push_url string

RemoveRemoteRequest

FieldTypeLabelDescription
repository Repository

name string

RemoveRemoteResponse

FieldTypeLabelDescription
result bool

UpdateRemoteMirrorRequest

FieldTypeLabelDescription
repository Repository

ref_name string

only_branches_matching bytes repeated

ssh_key string

known_hosts string

UpdateRemoteMirrorResponse

RemoteService

Method NameRequest TypeResponse TypeDescription
AddRemote AddRemoteRequest AddRemoteResponse

FetchInternalRemote FetchInternalRemoteRequest FetchInternalRemoteResponse

RemoveRemote RemoveRemoteRequest RemoveRemoteResponse

UpdateRemoteMirror UpdateRemoteMirrorRequest UpdateRemoteMirrorResponse

FindRemoteRepository FindRemoteRepositoryRequest FindRemoteRepositoryResponse

FindRemoteRootRef FindRemoteRootRefRequest FindRemoteRootRefResponse

ListRemotes ListRemotesRequest ListRemotesResponse

repository-service.proto

Top

ApplyGitattributesRequest

FieldTypeLabelDescription
repository Repository

revision bytes

ApplyGitattributesResponse

BackupCustomHooksRequest

FieldTypeLabelDescription
repository Repository

BackupCustomHooksResponse

FieldTypeLabelDescription
data bytes

CalculateChecksumRequest

FieldTypeLabelDescription
repository Repository

CalculateChecksumResponse

FieldTypeLabelDescription
checksum string

CleanupRequest

FieldTypeLabelDescription
repository Repository

CleanupResponse

CloneFromPoolInternalRequest

FieldTypeLabelDescription
repository Repository

pool ObjectPool

source_repository Repository

CloneFromPoolInternalResponse

CloneFromPoolRequest

FieldTypeLabelDescription
repository Repository

pool ObjectPool

remote Remote

CloneFromPoolResponse

CreateBundleRequest

FieldTypeLabelDescription
repository Repository

CreateBundleResponse

FieldTypeLabelDescription
data bytes

CreateForkRequest

FieldTypeLabelDescription
repository Repository

source_repository Repository

CreateForkResponse

CreateRepositoryFromBundleRequest

FieldTypeLabelDescription
repository Repository

Only available on the first message

data bytes

CreateRepositoryFromBundleResponse

CreateRepositoryFromSnapshotRequest

FieldTypeLabelDescription
repository Repository

http_url string

http_auth string

CreateRepositoryFromSnapshotResponse

CreateRepositoryFromURLRequest

FieldTypeLabelDescription
repository Repository

url string

CreateRepositoryFromURLResponse

CreateRepositoryRequest

FieldTypeLabelDescription
repository Repository

CreateRepositoryResponse

DeleteConfigRequest

FieldTypeLabelDescription
repository Repository

keys string repeated

DeleteConfigResponse

FetchHTTPRemoteRequest

FieldTypeLabelDescription
repository Repository

remote Remote

timeout int32

FetchHTTPRemoteResponse

FetchRemoteRequest

FieldTypeLabelDescription
repository Repository

remote string

force bool

no_tags bool

timeout int32

ssh_key string

known_hosts string

no_prune bool

remote_params Remote

FetchRemoteResponse

FetchSourceBranchRequest

FieldTypeLabelDescription
repository Repository

source_repository Repository

source_branch bytes

target_ref bytes

FetchSourceBranchResponse

FieldTypeLabelDescription
result bool

FindLicenseRequest

FieldTypeLabelDescription
repository Repository

FindLicenseResponse

FieldTypeLabelDescription
license_short_name string

FindMergeBaseRequest

FieldTypeLabelDescription
repository Repository

revisions bytes repeated

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

FieldTypeLabelDescription
base string

FsckRequest

FieldTypeLabelDescription
repository Repository

FsckResponse

FieldTypeLabelDescription
error bytes

GarbageCollectRequest

FieldTypeLabelDescription
repository Repository

create_bitmap bool

GarbageCollectResponse

GetArchiveRequest

FieldTypeLabelDescription
repository Repository

commit_id string

prefix string

format GetArchiveRequest.Format

path bytes

GetArchiveResponse

FieldTypeLabelDescription
data bytes

GetInfoAttributesRequest

FieldTypeLabelDescription
repository Repository

GetInfoAttributesResponse

FieldTypeLabelDescription
attributes bytes

GetObjectDirectorySizeRequest

FieldTypeLabelDescription
repository Repository

GetObjectDirectorySizeResponse

FieldTypeLabelDescription
size int64

Object directory size in kilobytes

GetRawChangesRequest

FieldTypeLabelDescription
repository Repository

from_revision string

to_revision string

GetRawChangesResponse

FieldTypeLabelDescription
raw_changes GetRawChangesResponse.RawChange repeated

GetRawChangesResponse.RawChange

FieldTypeLabelDescription
blob_id string

size int64

new_path string

use fields 9 and 10 in place of 3 and 4 (respectively)

old_path string

operation GetRawChangesResponse.RawChange.Operation

raw_operation string

old_mode int32

new_mode int32

new_path_bytes bytes

the following fields, 9 and 10, will eventually replace 3 and 4

old_path_bytes bytes

GetSnapshotRequest

FieldTypeLabelDescription
repository Repository

GetSnapshotResponse

FieldTypeLabelDescription
data bytes

HasLocalBranchesRequest

FieldTypeLabelDescription
repository Repository

HasLocalBranchesResponse

FieldTypeLabelDescription
value bool

IsRebaseInProgressRequest

FieldTypeLabelDescription
repository Repository

rebase_id string

IsRebaseInProgressResponse

FieldTypeLabelDescription
in_progress bool

IsSquashInProgressRequest

FieldTypeLabelDescription
repository Repository

squash_id string

IsSquashInProgressResponse

FieldTypeLabelDescription
in_progress bool

PreFetchRequest

FieldTypeLabelDescription
source_repository Repository

target_repository Repository

object_pool ObjectPool

PreFetchResponse

Remote

FieldTypeLabelDescription
url string

name string

http_authorization_header string

mirror_refmaps string repeated

RepackFullRequest

FieldTypeLabelDescription
repository Repository

create_bitmap bool

RepackFullResponse

RepackIncrementalRequest

FieldTypeLabelDescription
repository Repository

RepackIncrementalResponse

RepositoryExistsRequest

FieldTypeLabelDescription
repository Repository

RepositoryExistsResponse

FieldTypeLabelDescription
exists bool

RepositorySizeRequest

FieldTypeLabelDescription
repository Repository

RepositorySizeResponse

FieldTypeLabelDescription
size int64

Repository size in kilobytes

RestoreCustomHooksRequest

FieldTypeLabelDescription
repository Repository

data bytes

RestoreCustomHooksResponse

SearchFilesByContentRequest

FieldTypeLabelDescription
repository Repository

query string

ref bytes

chunked_response bool

SearchFilesByContentResponse

FieldTypeLabelDescription
matches bytes repeated

match_data bytes

end_of_match bool

SearchFilesByNameRequest

FieldTypeLabelDescription
repository Repository

query string

ref bytes

SearchFilesByNameResponse

FieldTypeLabelDescription
files bytes repeated

SetConfigRequest

FieldTypeLabelDescription
repository Repository

entries SetConfigRequest.Entry repeated

SetConfigRequest.Entry

FieldTypeLabelDescription
key string

value_str string

value_int32 int32

value_bool bool

SetConfigResponse

WriteConfigRequest

FieldTypeLabelDescription
repository Repository

full_path string

WriteConfigResponse

FieldTypeLabelDescription
error bytes

WriteRefRequest

FieldTypeLabelDescription
repository Repository

ref bytes

revision bytes

old_revision bytes

force bool

WriteRefResponse

GetArchiveRequest.Format

NameNumberDescription
ZIP 0

TAR 1

TAR_GZ 2

TAR_BZ2 3

RepositoryService

Method NameRequest TypeResponse TypeDescription
RepositoryExists RepositoryExistsRequest RepositoryExistsResponse

RepackIncremental RepackIncrementalRequest RepackIncrementalResponse

RepackFull RepackFullRequest RepackFullResponse

GarbageCollect GarbageCollectRequest GarbageCollectResponse

RepositorySize RepositorySizeRequest RepositorySizeResponse

ApplyGitattributes ApplyGitattributesRequest ApplyGitattributesResponse

FetchRemote FetchRemoteRequest FetchRemoteResponse

CreateRepository CreateRepositoryRequest CreateRepositoryResponse

GetArchive GetArchiveRequest GetArchiveResponse

HasLocalBranches HasLocalBranchesRequest HasLocalBranchesResponse

FetchSourceBranch FetchSourceBranchRequest FetchSourceBranchResponse

Fsck FsckRequest FsckResponse

WriteRef WriteRefRequest WriteRefResponse

FindMergeBase FindMergeBaseRequest FindMergeBaseResponse

CreateFork CreateForkRequest CreateForkResponse

IsRebaseInProgress IsRebaseInProgressRequest IsRebaseInProgressResponse

IsSquashInProgress IsSquashInProgressRequest IsSquashInProgressResponse

CreateRepositoryFromURL CreateRepositoryFromURLRequest CreateRepositoryFromURLResponse

CreateBundle CreateBundleRequest CreateBundleResponse

CreateRepositoryFromBundle CreateRepositoryFromBundleRequest CreateRepositoryFromBundleResponse

WriteConfig WriteConfigRequest WriteConfigResponse

SetConfig SetConfigRequest SetConfigResponse

DeleteConfig DeleteConfigRequest DeleteConfigResponse

FindLicense FindLicenseRequest FindLicenseResponse

GetInfoAttributes GetInfoAttributesRequest GetInfoAttributesResponse

CalculateChecksum CalculateChecksumRequest CalculateChecksumResponse

Cleanup CleanupRequest CleanupResponse

GetSnapshot GetSnapshotRequest GetSnapshotResponse

CreateRepositoryFromSnapshot CreateRepositoryFromSnapshotRequest CreateRepositoryFromSnapshotResponse

GetRawChanges GetRawChangesRequest GetRawChangesResponse

SearchFilesByContent SearchFilesByContentRequest SearchFilesByContentResponse

SearchFilesByName SearchFilesByNameRequest SearchFilesByNameResponse

RestoreCustomHooks RestoreCustomHooksRequest RestoreCustomHooksResponse

BackupCustomHooks BackupCustomHooksRequest BackupCustomHooksResponse

PreFetch PreFetchRequest PreFetchResponse

FetchHTTPRemote FetchHTTPRemoteRequest FetchHTTPRemoteResponse

GetObjectDirectorySize GetObjectDirectorySizeRequest GetObjectDirectorySizeResponse

CloneFromPool CloneFromPoolRequest CloneFromPoolResponse

CloneFromPoolInternal CloneFromPoolInternalRequest CloneFromPoolInternalResponse

server.proto

Top

ServerInfoRequest

ServerInfoResponse

FieldTypeLabelDescription
server_version string

git_version string

storage_statuses ServerInfoResponse.StorageStatus repeated

ServerInfoResponse.StorageStatus

FieldTypeLabelDescription
storage_name string

readable bool

writeable bool

fs_type string

filesystem_id string

ServerService

Method NameRequest TypeResponse TypeDescription
ServerInfo ServerInfoRequest ServerInfoResponse

shared.proto

Top

Branch

Corresponds to Gitlab::Git::Branch

FieldTypeLabelDescription
name bytes

target_commit GitCommit

CommitAuthor

FieldTypeLabelDescription
name bytes

email bytes

date google.protobuf.Timestamp

ExitStatus

FieldTypeLabelDescription
value int32

GitCommit

Corresponds to Gitlab::Git::Commit

FieldTypeLabelDescription
id string

subject bytes

body bytes

author CommitAuthor

committer CommitAuthor

parent_ids string repeated

body_size int64

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.

ObjectPool

FieldTypeLabelDescription
repository Repository

OperationMsg

FieldTypeLabelDescription
op OperationMsg.Operation

scope_level OperationMsg.Scope

Scope level indicates how a mutating RPC affects Gitaly: - REPOSITORY: mutation is scoped to only a single repo - SERVER: mutation affects the entire server and potentially all repos

target_repository_field string

If this operation modifies a repository, this field will specify the location of the Repository field within the request message. The field is specified in an OID style formatted string. For example, if the target repository is at the top level of a message at field 1, then the string will be "1" If the target repository is nested deeper in the message, then it will be necessary to specify a nested OID string. For example, the following OID refers to a target repo field nested in a one-of field, both at field one: "1.1"

Repository

FieldTypeLabelDescription
storage_name string

relative_path string

git_object_directory string

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

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

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

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

FieldTypeLabelDescription
name bytes

id string

target_commit GitCommit

message bytes

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

tagger CommitAuthor

User

FieldTypeLabelDescription
gl_id string

name bytes

email bytes

gl_username string

ObjectType

NameNumberDescription
UNKNOWN 0

COMMIT 1

BLOB 2

TREE 3

TAG 4

OperationMsg.Operation

NameNumberDescription
UNKNOWN 0

MUTATOR 1

ACCESSOR 2

OperationMsg.Scope

NameNumberDescription
REPOSITORY 0

SERVER 1

File-level Extensions

ExtensionTypeBaseNumberDescription
op_type OperationMsg .google.protobuf.MethodOptions 82303

Random high number..

smarthttp.proto

Top

InfoRefsRequest

FieldTypeLabelDescription
repository Repository

git_config_options string repeated

Parameters to use with git -c (key=value pairs)

git_protocol string

Git protocol version

InfoRefsResponse

FieldTypeLabelDescription
data bytes

PostReceivePackRequest

FieldTypeLabelDescription
repository Repository

repository should only be present in the first message of the stream

data bytes

Raw data to be copied to stdin of 'git receive-pack'

gl_id string

gl_id, gl_repository, and gl_username become env variables, used by the Git {pre,post}-receive hooks. They should only be present in the first message of the stream.

gl_repository string

gl_username string

git_protocol string

Git protocol version

git_config_options string repeated

Parameters to use with git -c (key=value pairs)

PostReceivePackResponse

FieldTypeLabelDescription
data bytes

Raw data from stdout of 'git receive-pack'

PostUploadPackRequest

FieldTypeLabelDescription
repository Repository

repository should only be present in the first message of the stream

data bytes

Raw data to be copied to stdin of 'git upload-pack'

git_config_options string repeated

Parameters to use with git -c (key=value pairs)

git_protocol string

Git protocol version

PostUploadPackResponse

FieldTypeLabelDescription
data bytes

Raw data from stdout of 'git upload-pack'

SmartHTTPService

Method NameRequest TypeResponse TypeDescription
InfoRefsUploadPack InfoRefsRequest InfoRefsResponse

The response body for GET /info/refs?service=git-upload-pack Will be invoked when the user executes a `git fetch`, meaning the server will upload the packs to that user. The user doesn't upload new objects.

InfoRefsReceivePack InfoRefsRequest InfoRefsResponse

The response body for GET /info/refs?service=git-receive-pack Will be invoked when the user executes a `git push`, meaning the server will receive new objects in the pack from the user.

PostUploadPack PostUploadPackRequest PostUploadPackResponse

Request and response body for POST /upload-pack

PostReceivePack PostReceivePackRequest PostReceivePackResponse

Request and response body for POST /receive-pack

ssh.proto

Top

SSHReceivePackRequest

FieldTypeLabelDescription
repository Repository

'repository' must be present in the first message.

stdin bytes

A chunk of raw data to be copied to 'git upload-pack' standard input

gl_id string

Contents of GL_ID, GL_REPOSITORY, and GL_USERNAME environment variables for 'git receive-pack'

gl_repository string

gl_username string

git_protocol string

Git protocol version

git_config_options string repeated

Parameters to use with git -c (key=value pairs)

SSHReceivePackResponse

FieldTypeLabelDescription
stdout bytes

A chunk of raw data from 'git receive-pack' standard output

stderr bytes

A chunk of raw data from 'git receive-pack' standard error

exit_status ExitStatus

This field may be nil. This is intentional: only when the remote command has finished can we return its exit status.

SSHUploadArchiveRequest

FieldTypeLabelDescription
repository Repository

'repository' must be present in the first message.

stdin bytes

A chunk of raw data to be copied to 'git upload-archive' standard input

SSHUploadArchiveResponse

FieldTypeLabelDescription
stdout bytes

A chunk of raw data from 'git upload-archive' standard output

stderr bytes

A chunk of raw data from 'git upload-archive' standard error

exit_status ExitStatus

This value will only be set on the last message

SSHUploadPackRequest

FieldTypeLabelDescription
repository Repository

'repository' must be present in the first message.

stdin bytes

A chunk of raw data to be copied to 'git upload-pack' standard input

git_config_options string repeated

Parameters to use with git -c (key=value pairs)

git_protocol string

Git protocol version

SSHUploadPackResponse

FieldTypeLabelDescription
stdout bytes

A chunk of raw data from 'git upload-pack' standard output

stderr bytes

A chunk of raw data from 'git upload-pack' standard error

exit_status ExitStatus

This field may be nil. This is intentional: only when the remote command has finished can we return its exit status.

SSHService

Method NameRequest TypeResponse TypeDescription
SSHUploadPack SSHUploadPackRequest SSHUploadPackResponse

To forward 'git upload-pack' to Gitaly for SSH sessions

SSHReceivePack SSHReceivePackRequest SSHReceivePackResponse

To forward 'git receive-pack' to Gitaly for SSH sessions

SSHUploadArchive SSHUploadArchiveRequest SSHUploadArchiveResponse

To forward 'git upload-archive' to Gitaly for SSH sessions

storage.proto

Top

DeleteAllRepositoriesRequest

FieldTypeLabelDescription
storage_name string

DeleteAllRepositoriesResponse

ListDirectoriesRequest

FieldTypeLabelDescription
storage_name string

depth uint32

ListDirectoriesResponse

FieldTypeLabelDescription
paths string repeated

StorageService

Method NameRequest TypeResponse TypeDescription
ListDirectories ListDirectoriesRequest ListDirectoriesResponse

DeleteAllRepositories DeleteAllRepositoriesRequest DeleteAllRepositoriesResponse

wiki.proto

Top

WikiCommitDetails

FieldTypeLabelDescription
name bytes

email bytes

message bytes

user_id int32

user_name bytes

WikiDeletePageRequest

FieldTypeLabelDescription
repository Repository

page_path bytes

commit_details WikiCommitDetails

WikiDeletePageResponse

WikiFindFileRequest

FieldTypeLabelDescription
repository Repository

name bytes

revision bytes

Optional: revision

WikiFindFileResponse

FieldTypeLabelDescription
name bytes

If 'name' is empty, the file was not found.

mime_type string

raw_data bytes

path bytes

WikiFindPageRequest

FieldTypeLabelDescription
repository Repository

title bytes

revision bytes

directory bytes

WikiFindPageResponse

WikiFindPageResponse is a stream because we need multiple WikiPage

messages to send the raw_data field.

FieldTypeLabelDescription
page WikiPage

WikiGetAllPagesRequest

FieldTypeLabelDescription
repository Repository

limit uint32

Passing 0 means no limit is applied

direction_desc bool

sort WikiGetAllPagesRequest.SortBy

WikiGetAllPagesResponse

The WikiGetAllPagesResponse stream is a concatenation of WikiPage streams

FieldTypeLabelDescription
page WikiPage

end_of_page bool

When end_of_page is true it signals a change of page for the next Response message (if any)

WikiGetFormattedDataRequest

FieldTypeLabelDescription
repository Repository

title bytes

revision bytes

directory bytes

WikiGetFormattedDataResponse

FieldTypeLabelDescription
data bytes

WikiGetPageVersionsRequest

FieldTypeLabelDescription
repository Repository

page_path bytes

page int32

per_page int32

WikiGetPageVersionsResponse

FieldTypeLabelDescription
versions WikiPageVersion repeated

WikiListPagesRequest

FieldTypeLabelDescription
repository Repository

limit uint32

Passing 0 means no limit is applied

direction_desc bool

sort WikiListPagesRequest.SortBy

offset uint32

WikiListPagesResponse

The WikiListPagesResponse stream is a concatenation of WikiPage streams without content

FieldTypeLabelDescription
page WikiPage

WikiPage

FieldTypeLabelDescription
version WikiPageVersion

These fields are only present in the first message of a WikiPage stream

format string

title bytes

url_path string

path bytes

name bytes

historical bool

raw_data bytes

This field is present in all messages of a WikiPage stream

WikiPageVersion

FieldTypeLabelDescription
commit GitCommit

format string

WikiUpdatePageRequest

FieldTypeLabelDescription
repository Repository

There fields are only present in the first message of the stream

page_path bytes

title bytes

format string

commit_details WikiCommitDetails

content bytes

This field is present in all messages

WikiUpdatePageResponse

FieldTypeLabelDescription
error bytes

WikiWritePageRequest

This message is sent in a stream because the 'content' field may be large.

FieldTypeLabelDescription
repository Repository

These following fields are only present in the first message.

name bytes

format string

commit_details WikiCommitDetails

content bytes

This field is present in all messages.

WikiWritePageResponse

FieldTypeLabelDescription
duplicate_error bytes

WikiGetAllPagesRequest.SortBy

NameNumberDescription
TITLE 0

CREATED_AT 1

WikiListPagesRequest.SortBy

NameNumberDescription
TITLE 0

CREATED_AT 1

WikiService

Method NameRequest TypeResponse TypeDescription
WikiGetPageVersions WikiGetPageVersionsRequest WikiGetPageVersionsResponse

WikiWritePage WikiWritePageRequest WikiWritePageResponse

WikiUpdatePage WikiUpdatePageRequest WikiUpdatePageResponse

WikiDeletePage WikiDeletePageRequest WikiDeletePageResponse

WikiFindPage WikiFindPageRequest WikiFindPageResponse

WikiFindPage returns a stream because the page's raw_data field may be arbitrarily large.

WikiFindFile WikiFindFileRequest WikiFindFileResponse

WikiGetAllPages WikiGetAllPagesRequest WikiGetAllPagesResponse

WikiListPages WikiListPagesRequest WikiListPagesResponse

WikiGetFormattedData WikiGetFormattedDataRequest WikiGetFormattedDataResponse

Scalar Value Types

.proto TypeNotesC++ TypeJava TypePython Type
double double double float
float 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
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
uint32 Uses variable-length encoding. uint32 int int/long
uint64 Uses variable-length encoding. uint64 long int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long
sfixed32 Always four bytes. int32 int int
sfixed64 Always eight bytes. int64 long int/long
bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode
bytes May contain any arbitrary sequence of bytes. string ByteString str