Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Fargher <jfargher@gitlab.com>2021-08-03 05:18:48 +0300
committerJames Fargher <jfargher@gitlab.com>2021-08-06 01:33:54 +0300
commit51a57c1546a61a58300b4036a8fc47490735ca04 (patch)
treea665fa7c090d06e74a0d3b9c092afe22d2ba6470 /proto/ref.proto
parent59dfc252c79b7f9d290a3ede54c9ba8a3b12d4bd (diff)
Add ListRef RPC to protos
Diffstat (limited to 'proto/ref.proto')
-rw-r--r--proto/ref.proto37
1 files changed, 37 insertions, 0 deletions
diff --git a/proto/ref.proto b/proto/ref.proto
index b53281955..0c0f08bd3 100644
--- a/proto/ref.proto
+++ b/proto/ref.proto
@@ -122,6 +122,15 @@ service RefService {
op: MUTATOR
};
}
+
+ // 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.
+ rpc ListRefs(ListRefsRequest) returns (stream ListRefsResponse) {
+ option (op_type) = {
+ op: ACCESSOR
+ };
+ }
}
message ListNewBlobsRequest {
@@ -414,3 +423,31 @@ message PackRefsRequest {
}
message PackRefsResponse{}
+
+// ListRefsRequest is a request for the ListRefs RPC.
+message ListRefsRequest {
+ // Repository is the repository in which references should be listed in.
+ Repository repository = 1 [(target_repository)=true];
+ // 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.
+ repeated bytes patterns = 2;
+ // Head determines whether the RPC should also return the HEAD reference. By default,
+ // pseudo-refs are not included in the response.
+ bool head = 3;
+}
+
+// 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.
+message ListRefsResponse{
+ // Reference is a direct Git reference. No symbolic references will ever be returned by this RPC.
+ message Reference {
+ // Name is the fully qualified name of the reference.
+ bytes name = 1;
+ // Target is the object ID the reference points to.
+ string target = 2;
+ }
+
+ // References is the set of references returned by the RPC.
+ repeated Reference references = 1;
+}