Re: [RFC/PATCH 2/3] replace_object: add mechanism to replace objects found in "refs/replace/"
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jan 10, 2009, 16:30 UTC
- Message-ID
- <m3tz87yvh4.fsf@localhost.localdomain>
- In-Reply-To
- <7v8wpl4akr.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
> Christian Couder <chriscool@tuxfamily.org> 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