Subject: Re: [RFC/PATCH 2/3] replace_object: add mechanism to replace objects found in "refs/replace/"

From: Jakub Narebski <[email-masked]>
Date: Sat, 10 Jan 2009 08:30:39 -0800 (PST)

Junio C Hamano <[email-masked]> writes:
> Christian Couder <[email-masked]> writes:
> 
> > Yeah, but read_sha1_file is called to read all object files, not just 
> > commits. So putting the hook there will:
> >
> > 	1) add a lookup overhead when reading any object,
> > 	2) make it possible to replace any object,
> 
> I actually see (2) as an improvement, and (1) as an associated cost.

I just had an idea: we can use this mechanism to better manage large
binary files in Git, by using replacements for _blobs_.

We want to be able to have two flavours of repository: one with large
blobs (media files usually), and one without.  We can use stubs in the
place of large binary files in 'no-megablobs' flavor, and add contents
of those files via refs/replace/* for _blobs_ in 'with-megablobs'
flavour.  We can control which objects we want to have, and which
objects to transfer.

What do you think about this (abuse of) an idea?
-- 
Jakub Narebski
Poland
ShadeHawk on #git