RepositoryService: implement ApplyGitattributes
On the Rails side, the corresponding method on the Git::Repository
class is copy_gitattributes
and is needed for fully native repositories without any Git repo (see heptapod!290 (merged)).
See also official doc of Git Attributes
Apparently, what the reference Gitaly implementation does is to copy the checked-in .gitattributes
file at a given revision into the non checked-in (global) info/attributes
.
I suppose this makes for a much faster access than querying the blob content over and over. This makes it more directly related to heptapod#437 than #81
Here we could decide to fallback to or merge with .heptapod-attributes
or .hgattributes
files if they exist (and if we want to introduce those files).