RefService.ListRefs: implement pointing_at_oids
This new request field was introduced in Gitaly v15.9:
diff -r 203acd44cc85 protos/ref.proto
--- a/protos/ref.proto Sun Jun 11 12:37:58 2023 +0200
+++ b/protos/ref.proto Tue Jul 04 17:27:45 2023 +0200
@@ -592,6 +592,13 @@
bool head = 3;
// SortBy allows to request SHAs in particular order.
// SortBy allows to request SHAs in particular order.
SortBy sort_by = 4;
+ // PointingAtOids 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).
+ repeated bytes pointing_at_oids = 5;
+ // PeelTags 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.
+ bool peel_tags = 6;
}
// ListRefsResponse is a response for the ListRefs RPC. The RPC can return multiple responses
@@ -603,6 +610,9 @@
bytes name = 1;
// Target is the object ID the reference points to.
string target = 2;
+ // PeeledTarget 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.
+ string peeled_target = 3;
}
(Peeling tags is irrelevant in Mercurial context)