repository: stop using info/attributes in git 2.43.0
From 2.43.0
, git starts supporting reading .gitattributes
from HEAD ref.
Once git 2.43.0
is deployed, we can stop using info/attributes
in
related RPCs, i.e. ApplyGitattributes()
and GetInfoAttributes()
.
The following actions are taken in order to 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).
Closes #5348 (closed)
Edited by Eric Ju