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

Re: [RFC] deprecating and eventually removing "git relink"?

From
SBSimon Brenner <olsner@gmail.com>
Date
Nov 14, 2011, 08:48 UTC
Message-ID
<CAD=rjTXgH+AivmK+zLurQVC+=p1UYqFy_p=wBF-1-TOQ=Cqjtw@mail.gmail.com>
In-Reply-To
<buomxbzutjm.fsf@dhlpc061.dev.necel.com>

I think one of the most annoying aspects of alternates (beyond the hassle of adding/removing them except using clone --reference) is the danger of losing data if you aren't absolutely sure that your alternate is stable and won't ever lose references to objects.

If the alternate just had links to the referring repositories, I think this hole could be neatly closed.

On Mon, Nov 14, 2011 at 7:06 AM, Miles Bader <miles@gnu.org> wrote:
Show 5 quoted lines
> It might be nice to have a mechanism where new objects would update
> the _alternate_ rather than the object-store in the tree where the
> command was run... then you could easily have a bunch of trees using a
> central object store without needing to update the central store
> occasionally by hand (and do gc in its "clients")...

This sounds like a nice way forward: replace/extend the current alternates system with support for a shared object store that is "intelligently" shared so that it can be gc:d based on all refs from all referring repositories. I imagine it would be something very much like a bare repository - except it wouldn't have any refs of its own, just a list of other repositories it should search for refs when GC:ing.

The object store currently built into each git repository could even become a special case of that: a shared object store (that happens to reside under .git) with a single referring repository (the parent .git dir). If the location of the object store is configurable, clone --reference could simply point the new repository directly to the shared store instead of ever setting up a local object store.

// Simon
Previous: Chris PackhamNext: Jeff King
Message 5 of 15 in “[RFC] deprecating and eventually removing "git relink"?”
  1. Junio C HamanoNov 14, 2011
  2. Miles BaderNov 14, 2011
  3. Junio C HamanoNov 14, 2011
  4. Chris PackhamNov 14, 2011
  5. Simon BrennerNov 14, 2011
  6. Jeff KingNov 14, 2011
  7. Junio C HamanoNov 14, 2011
  8. Jeff KingNov 14, 2011
  9. Junio C HamanoNov 14, 2011
  10. Miles BaderNov 15, 2011
  11. Phillip SusiNov 21, 2011
  12. Jeff KingNov 21, 2011
  13. Phillip SusiNov 22, 2011
  14. Junio C HamanoNov 14, 2011
  15. Miles BaderNov 15, 2011

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.