diff options
author | John Cai <jcai@gitlab.com> | 2021-10-21 20:37:19 +0300 |
---|---|---|
committer | John Cai <jcai@gitlab.com> | 2021-10-25 16:13:59 +0300 |
commit | 35cead8ba918ac2ecbfd52a36f29f668fbd12a6b (patch) | |
tree | 1893ded01b021b1441a292825f235f319288d1ba /proto | |
parent | ee4b20cc318876c4b237e277fefd9d75186a085c (diff) |
find_refs_by_id: Use 'refname' as the default sort order
The default sort order was '-refname' (reverse lexicographic based on the refname) for FindRefsByOID. The general use case is to use the alphabetical 'refname' (lexicographic based on the refname) sort order, so this MR changes that.
The `git for-each-ref` command that performs the search doesn't need to be passed 'refname' explicitly, as 'refname' is the default for `git for-each-ref`. So the code can be simplified a bit.
Changelog: changed
Diffstat (limited to 'proto')
-rw-r--r-- | proto/go/gitalypb/ref.pb.go | 2 | ||||
-rw-r--r-- | proto/ref.proto | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/proto/go/gitalypb/ref.pb.go b/proto/go/gitalypb/ref.pb.go index 65ce07f73..b08c41728 100644 --- a/proto/go/gitalypb/ref.pb.go +++ b/proto/go/gitalypb/ref.pb.go @@ -2460,7 +2460,7 @@ type FindRefsByOIDRequest struct { // If left empty, defaults to "refs/heads/" and "refs/tags/" RefPatterns []string `protobuf:"bytes,3,rep,name=ref_patterns,json=refPatterns,proto3" json:"ref_patterns,omitempty"` // sort_field determines the sort order of the resulting refs. - // If left empty, defaults to "-refname" (reverse lexigraphic refname order) + // If left empty, defaults to "refname" (lexicographic refname order) SortField string `protobuf:"bytes,4,opt,name=sort_field,json=sortField,proto3" json:"sort_field,omitempty"` // limit limits the amount of results returned. 0 means no limit. Limit uint32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` diff --git a/proto/ref.proto b/proto/ref.proto index 26e752977..e3798b3e3 100644 --- a/proto/ref.proto +++ b/proto/ref.proto @@ -440,7 +440,7 @@ message FindRefsByOIDRequest { // If left empty, defaults to "refs/heads/" and "refs/tags/" repeated string ref_patterns = 3; // sort_field determines the sort order of the resulting refs. - // If left empty, defaults to "-refname" (reverse lexigraphic refname order) + // If left empty, defaults to "refname" (lexicographic refname order) string sort_field = 4; // limit limits the amount of results returned. 0 means no limit. uint32 limit = 5; |