threads / discuss / 16136

Git and Media repositories....

Subject: Git and Media repositories....

## tl;dr

6 messages between Nov 2, 2008 and Nov 9, 2008.

replies: 5people: 5as markdown or json

Tim Ansell· Nov 2, 2008, 19:50 UTC · lore
Hey guys,

Last week at the gittogether I lead some discussions about how we could make Git better support large media repositories (which is one area where Subversion still make sense). It was suggested that I post to this list to get a discussion going.

The general idea is that we always clone the complete meta-data (tags, commits and trees) and then only clone blobs when they are needed (using something like alternates). This allows us to support shallow, narrow and sparse checkouts while still being able to perform operations such as committing and merging.

You can find a copy of the summary presentation at
 http://www.thousandparsec.net/~tim/media+git.pdf

I have started working on adapting git to check a remote http alternate to provide a proof of concept.

I appreciate any help or suggestions.
Tim 'mithro' Ansell
Johannes Schindelin· Nov 3, 2008, 06:56 UTC · re: Tim Ansell · lore

Re: Git and Media repositories....

Hi,
On Sun, 2 Nov 2008, Tim Ansell wrote:
Show 18 quoted lines
> Last week at the gittogether I lead some discussions about how we could 
> make Git better support large media repositories (which is one area 
> where Subversion still make sense). It was suggested that I post to this 
> list to get a discussion going.
> 
> The general idea is that we always clone the complete meta-data (tags, 
> commits and trees) and then only clone blobs when they are needed (using 
> something like alternates). This allows us to support shallow, narrow 
> and sparse checkouts while still being able to perform operations such 
> as committing and merging.
> 
> You can find a copy of the summary presentation at
>  http://www.thousandparsec.net/~tim/media+git.pdf
> 
> I have started working on adapting git to check a remote http alternate 
> to provide a proof of concept.
> 
> I appreciate any help or suggestions.

You might find this message (and others from the same time frame and author) pretty interesting:

http://article.gmane.org/gmane.comp.version-control.git/48485

Ciao, Dscho

Jakub Narebski· Nov 3, 2008, 09:40 UTC · re: Tim Ansell · lore

Re: Git and Media repositories....

Tim Ansell <mithro@mithis.com> writes:
Show 18 quoted lines
> Last week at the GitTogether I lead some discussions about how we could
> make Git better support large media repositories (which is one area
> where Subversion still make sense). It was suggested that I post to this
> list to get a discussion going. 
> 
> The general idea is that we always clone the complete meta-data (tags,
> commits and trees) and then only clone blobs when they are needed (using
> something like alternates). This allows us to support shallow, narrow
> and sparse checkouts while still being able to perform operations such
> as committing and merging.
> 
> You can find a copy of the summary presentation at
>  http://www.thousandparsec.net/~tim/media+git.pdf
> 
> I have started working on adapting git to check a remote http alternate
> to provide a proof of concept.
> 
> I appreciate any help or suggestions.

Dana How (CC-ed) worked on better support for large files, but in corporate setting. The solution that was the result of all discussion and all patches (not all accpeted) was to create kept packfile for those large files, and share those packfiles (perhaps via alternates) using network filesystem, instead of keeping separate copies and trasferring them on fetch / push.

>From what I remember there was one serious attempt (by serious I mean

here with patches) to add 'lazy clone' / 'sparse clone' / 'remote alternates', using some kind of "stub" objects and trasferring objects lazily. This patch was fairly intrusive, and didn't get accepted. I think you can find it in archives. Unfortunately I haven't bookmarked this thread...

The problem with lazy clone is that git assumes in many places that if it has some object, it has all its dependencies. Lazy clone (on-demand object loading) breaks this assumption... although in your case (only blobs of large size can be asked to be loaded lazily) it is migitated somehow.

I also think that you would have to have 'sparse checkout' support. If you don't have blob in object repository (and don't want to have it there), you can not check it out. Fortunately this feature is quite alive, and worked on by Duy (pclouds), see "What's cooking..." (nd/narrow branch in 'pu').

HTH
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Jakub Narebski· Nov 7, 2008, 13:00 UTC · re: Tim Ansell · lore

Re: Git and Media repositories....

Tim Ansell <mithro@mithis.com> writes:
Show 10 quoted lines
> Last week at the gittogether I lead some discussions about how we could
> make Git better support large media repositories (which is one area
> where Subversion still make sense). It was suggested that I post to this
> list to get a discussion going. 
> 
> The general idea is that we always clone the complete meta-data (tags,
> commits and trees) and then only clone blobs when they are needed (using
> something like alternates). This allows us to support shallow, narrow
> and sparse checkouts while still being able to perform operations such
> as committing and merging.
[...]

Well, the *workaround* you could currently use is to put large media files in separate subdirectory, and make this subdirectory into submodule. This uses the fact that you can selectively clone submodules, or leave them as a stubs...

...and this is also the code you might want to look at when implementings stubs for 'remote' blob objects

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Santi Béjar· Nov 7, 2008, 13:19 UTC · re: Tim Ansell · lore

Re: Git and Media repositories....

On Sun, Nov 2, 2008 at 8:50 PM, Tim Ansell <mithro@mithis.com> wrote:
> Hey guys,
>
[...]
Show 7 quoted lines
>
> The general idea is that we always clone the complete meta-data (tags,
> commits and trees) and then only clone blobs when they are needed (using
> something like alternates). This allows us to support shallow, narrow
> and sparse checkouts while still being able to perform operations such
> as committing and merging.
>

A related use case could be to remove a blob from a repo but being able to work normally with it, similar to:

http://wiki.freebsd.org/VCSFeatureObliterate
Santi
Nguyen Thai Ngoc Duy· Nov 9, 2008, 04:58 UTC · re: Santi Béjar · lore

Re: Git and Media repositories....

On 11/7/08, Santi Béjar <santi@agolina.net> wrote:
Show 20 quoted lines
> On Sun, Nov 2, 2008 at 8:50 PM, Tim Ansell <mithro@mithis.com> wrote:
>  > Hey guys,
>  >
>
>  [...]
>
>
>  >
>  > The general idea is that we always clone the complete meta-data (tags,
>  > commits and trees) and then only clone blobs when they are needed (using
>  > something like alternates). This allows us to support shallow, narrow
>  > and sparse checkouts while still being able to perform operations such
>  > as committing and merging.
>  >
>
>
> A related use case could be to remove a blob from a repo but being
>  able to work normally with it, similar to:
>
>  http://wiki.freebsd.org/VCSFeatureObliterate

Maybe another use case: encrypted blobs (those are generally unavailable until corrected password is given, so they are "holes" in checkout/clone). It could be used to store sensitive content (in $HOME for example)

-- 
Duy

← back to recent threads