Gitaly stops using info/attributes
Working on gitaly to make it stop using info/attributes
- making
ApplyGitattributes()no-op, so that Gitaly clients will stop writing toinfo/attributes; - making
GetInfoAttributes()return the content ofHEAD:.gitattributes, this is to address the N+1 problem as discussed here; - making
GetInfoAttributes()deleteinfo/attributesfile first before callinggit cat-file, so thatinfo/attributeswill not overwrite.gitattributes(becauseinfo/attributeshas high precedence); - stop referencing
GetInfoAttributes()inside gitaly, useGetFileAttributes()instead, we do this to prepare future deletingGetInfoAttributes(); - making
GetFileAttributes()deleteinfo/attributesfile first before callinggit check-attr, so thatinfo/attributeswill not overwrite.gitattributes(becauseinfo/attributeshas high precedence).
The reason to add logic to removeing info/attributeslogic is from here. A short summary is that we want to keep updating info/gitattributes until it's removed. After gitlab#414855 (closed), rails will still be able to update info/gitattributes, because ApplyGitattributes() is still in use. Now, it is time for gitaly to stop using ApplyGitattributes(), we can start removing info/gitattributes.
This temporary logic should be removed once proper house keeping jobs are called so that all info/gitattributes files are removed, see #5347 (closed).
Edited by Eric Ju