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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-03-27 15:31:15 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-04-11 15:21:27 +0300
commitc830b8e3b782da466d73892728a8ddb869e7d47c (patch)
tree02c0ecf81fd7a2b6136cea672a742f79e95a8a99 /lib/gitlab/gitaly_client/repository_service.rb
parent863e1a7a053c8b193fb945f24eff25b96079b2c2 (diff)
Client implementation for InfoAttributes
Clients can now request the attributes from `$GIT_DIR/info/attributes` through Gitaly. The Gitaly migration is described in gitlab-org/gitaly#1082. The parser algorithm was implemented in a way it could handle both file contents or a File handle, and both were already tested. Other than that, using the boy scout rule, I've removed a class, InfoAttributes, as it was delegating everything to the parser and therefor wasn't really needed in my opinion.
Diffstat (limited to 'lib/gitlab/gitaly_client/repository_service.rb')
-rw-r--r--lib/gitlab/gitaly_client/repository_service.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client/repository_service.rb b/lib/gitlab/gitaly_client/repository_service.rb
index 6441065f5fe..39057beefba 100644
--- a/lib/gitlab/gitaly_client/repository_service.rb
+++ b/lib/gitlab/gitaly_client/repository_service.rb
@@ -50,6 +50,15 @@ module Gitlab
GitalyClient.call(@storage, :repository_service, :apply_gitattributes, request)
end
+ def info_attributes
+ request = Gitaly::GetInfoAttributesRequest.new(repository: @gitaly_repo)
+
+ response = GitalyClient.call(@storage, :repository_service, :get_info_attributes, request)
+ response.each_with_object("") do |message, attributes|
+ attributes << message.attributes
+ end
+ end
+
def fetch_remote(remote, ssh_auth:, forced:, no_tags:, timeout:, prune: true)
request = Gitaly::FetchRemoteRequest.new(
repository: @gitaly_repo, remote: remote, force: forced,