Add a method to copy the .gitattributes into the bare repository
Added a method which will copy the contents of .gitattributes at the
given ref into info/attributes in the bar repository. This will
allow Rugged to successfully use the attributes when producing its output.
Works towards a fix for gitlab-org/gitlab-ce#2315
Before this gets merged in:
-
gitlab-org/gitlab-git-test will need to be updated with the two additional branches in matto1990/gitlab-git-test (
gitattributesandgitattributes-updated). - The 2nd commit should be removed for this branch, leaving the
spec/support/seed_helper.rbfile unchanged frommaster.
Some bits I would like feedback on:
- Is the method in the correct place?
- Is it acceptable to be writing to the
info/attributesfile from insiderepository.rb? There seems to be another case of files being written in this class in thearchive_to_filemethod. - Are the tests in the correct format?
- Is it ok to be adding and removing the
infodirectory from the test repo? I've addedaftermethods to clean up and the tests seem to be fine, but I wanted to check this was ok.