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/attributes
file first before callinggit cat-file
, so thatinfo/attributes
will not overwrite.gitattributes
(becauseinfo/attributes
has high precedence); - stop referencing
GetInfoAttributes()
inside gitaly, useGetFileAttributes()
instead, we do this to prepare future deletingGetInfoAttributes()
; - making
GetFileAttributes()
deleteinfo/attributes
file first before callinggit check-attr
, so thatinfo/attributes
will not overwrite.gitattributes
(becauseinfo/attributes
has high precedence).
The reason to add logic to removeing info/attributes
logic 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.
Edited by Eric Ju