Additional parameters for Tree API - Sort, filterBy
Please introduce two additional parameters to the [Tree API](https://docs.gitlab.com/ce/api/repositories.html#list-repository-tree) I. **sort by** and **sort type** - The **sort by** can accept the field on which the sort needs to be performed. - The **sort type** can be 'ascending'/'descending' - The pagination usecase would honor the sort fields. II. **filterBy** Add the support to filter the content based on a field and its corresponding value. The immediate usecase is 'ability to filter the tree object from the result, similar to `git ls-tree -r HEAD` behavior' Adding the following for reference :) > Hi > > Posting this issue here as [requested](https://gitlab.com/gitlab-org/gitaly/issues/690) from gitaly team. > > We are using Gitlab API for one of our application and I'm trying to understand the sort key that is used by gitlab to get all the tree entries in the `/projects/:id/repository/tree` API. > > > ```bash > git ls-tree -r > ``` > OR > > ```bash > git ls-tree -r -t > ``` > is the behavior that I'm expecting from this web api, but it is returning the following **with an internal sorting**. > > ```bash > git ls-tree -r -t > ``` > > 1. Could someone explain what's the exact sorting that is used by the api on tree entries list. > 2. Would it be possible to add support for an additional request parameter for the following git ls-tree behavior. > > ```bash > git ls-tree -r > ``` Thanks, Narayan
issue