by vhanda · 4y ago · 0 comments
I do, however, want to support partial clones and easier tools to cleanup the history and reduce the repo size.
libgit2 already supports filters and that’s all you need to build lfs support (actually, you don’t even really need to use them if you don’t want to). Lfs itself is not a feature of git. It’s a specification that defines a protocol for replacing large files with pointers (via the use of the smudge and clean filters) and uploading said large files to another location.
Source: I am the cofounder and former CTO of forestry.io, a git backed content management system, and I implemented lfs support in conjunction with libgit2 in that product about 4 years ago.
I'm not super familiar with LFS beyond its name and stated intentions, but after a cursory review it seems to be extremely manual/tedious, so much that it makes git itself look like a paragon of automated magic and user-friendliness. Maybe that's an unfair assessment, or maybe it could be made automatic, but I'm less sure that its the solution I'd want.
The use case I'm interested in is similar to the comment above "binary files. Photos, videos, etc", What I was hoping for with LFS would be like a thin clone of all my personal files where some files are only present in name with their contents downloaded on-demand on some devices. So I'm not sure if history pruning would help my use-case much.