Web lists-archives.com

Re: git-lfs integration?




On Tue, Jan 08 2019, Harald Dunkel wrote:

> I wonder why git-lfs is needed to efficiently handle large files
> in git. Would it be reasonable to integrate this functionality
> into the native git?
>
> Please excuse me asking. I read some pretty scary articles about
> rewriting history, asking everybody to clone existing repositories
> again, and strange errors if git-lfs is *not* installed. Apparently
> this is a one-way street, so I didn't dare to install git-lfs yet.

It depends on what "integrate this" means.

I think it's unlikely that git-lfs would be integrated as-is. There's
various clean/smudge filters like it that do remote downloads (also
git-annex). Everyone's probably better off if git itself maintains the
infra needed for that ecosystem, and users can vote by their usage which
one(s) they like.

But in more general terms the problem of making git natively friendlier
to "large files" is being worked on on multiple fronts.

For one, Microsoft has been upstreaming parts of their GVFS fork, if you
search for "partial clone" in release notes since 2.16.0 (including in
2.20.0) you'll see some of that work relevant to that. I.e. one part of
this is the general ability to have partially available local history,
whether it's skipping (big) blobs, some trees etc.

Another effort has been the introduction of the v2 protocol to Git,
which has happened recently, and is only now starting to get rolled out
at various hosting providers. That in and of itself hasn't helped with
this, but allows for future extensions to the protocol, such as "this is
not the full data, you can find the rest at xyz".

Then there's the "odb" effort, see e.g. here:
https://public-inbox.org/git/20180802061505.2983-1-chriscool@xxxxxxxxxxxxx/

I think that long-term (5-20yrs) those effors will probably completely
supplant the approach git-lfs is taking. It's a very useful tool, but
ultimately a bit of a hacky workaround in lieu of addressing fixable
issues in git itself, i.e. native support for partially downloaded
history. But getting to that point will take time & effort.