git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Johannes Schindelin
Message 5 of 7 in “replace_object: add mechanism to replace objects found in "refs/replace/"”
  1. 2/3 replace_object: add mechanism to replace objects found in "refs/replace/"Christian Couder, Jan 7, 2009
  2. Junio C HamanoJan 7, 2009
  3. Christian CouderJan 8, 2009
  4. Junio C HamanoJan 8, 2009
  5. Jakub NarebskiJan 10, 2009
  6. Johannes SchindelinJan 7, 2009
  7. Jakub NarebskiJan 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.