You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we assume that all LFS repositories look the same. However, there have been proposals to store Git LFS data differently, such as by compressing objects on disk to save space. Such a change would necessarily impede interoperability with older Git LFS versions.
The way that Git handles this is to set core.repositoryFormatVersion to a version number, and if it is not set, default to 0. If the version number is not known, then the repository is rejected. Presently, Git understands version 0, which is the original, and version 1, which is the same, but for a configuration options starting with extension.. If the repository is a v1 repository and any unknown extension is found, the repository is rejected as being in an unknown format.
I propose we adopt a config option, lfs.repositoryFormatVersion, that by default is 0 and that we write into the repository from v3.0.0 on. If we see a version number we don't support, we reject it. We can then adopt a v1 in a minor version in the future with appropriate rejection for extensions (e.g., lfs.repositoryExtensions.*).
This seems eminently sensible to me. My only question is around the wording here, in that the point as I understand it would be for the Git LFS v1 format to accept known extensions; it would only be if a Git LFS v1-aware client saw an unrecognized extension in a v1-format repository that a rejection would occur. In other words, akin to Git's native behaviour, as you noted at the top of the issue.
Yes, we would reject any unknown extensions, but accept known ones, in v1 repositories. We would also not parse extensions in v0 repositories. Sorry for the confusing text.
Activity
chrisd8088 commentedon Jun 20, 2021
This seems eminently sensible to me. My only question is around the wording here, in that the point as I understand it would be for the Git LFS v1 format to accept known extensions; it would only be if a Git LFS v1-aware client saw an unrecognized extension in a v1-format repository that a rejection would occur. In other words, akin to Git's native behaviour, as you noted at the top of the issue.
bk2204 commentedon Jun 21, 2021
Yes, we would reject any unknown extensions, but accept known ones, in v1 repositories. We would also not parse extensions in v0 repositories. Sorry for the confusing text.