Skip to content

Conversation CommitService::ListFiles

Gitlab::Git::Repository#ls_files



Gitlab::Git::Repository#ls_files https://gitlab.com/gitlab-org/gitlab-ce/blob/40cd50829944db38fac07014e5fa00eafa3d1bc7/lib/gitlab/git/repository.rb#L910-934

This looks relatively straight-forward (it uses git log at the moment). We can skip the sha_from_ref(actual_ref) call. Root ref lookup is already implemented in Gitaly, we can make a local function call.

service CommitService {
  // Use a stream to paginate the result
  rpc ListFiles(ListFilesRequest) returns stream(ListFilesResponse) {}
}

message ListFilesRequest {
  Repository repository = 1;
  bytes revision = 2;
}

// A single 'page' of the paginated response
message ListFilesResponse {
  repeated bytes paths // Remember to force encoding utf-8 on the client side
}
Edited by Zeger-Jan van de Weg
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information