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

Re: [PATCH 0/9] Multiple remotes without conflicts

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 18, 2010, 19:07 UTC
Message-ID
<20100318190712.GD10981@spearce.org>
In-Reply-To
<cover.1268913163.git.agruen@suse.de>
Andreas Gruenbacher <agruen@suse.de> wrote:
Show 10 quoted lines
> I'm still trying to find a simple and painless way of sharing the object
> store among multiple repositories: the idea is to have a "parent"
> repository which contains the actual object store, and a number of
> "child" repositories which link to that object store.  The obvious
> problem is garbage collection: we can only garbage collect the parent
> once it has all refs of all its children.
> 
> One way of ensuring that is to make each child a "remote" of the parent,
> and to fetch all remotes first.  This works for branches, but not for
> tags or for the reflog.
This just feels like the wrong solution.

Why can't we have a "$GIT_DIR/children" subdirectory with a symlink or file-containing-path to each child repository. Modify the fsck and gc paths to include these additional reference and reflog spaces, and that's that.

Child registration is then just a matter of installing the symlink
in the parent, or removing it, and gc/fsck never needs to worry
about a fetch up front in order for it to be accurate.
 
-- 
Shawn.
Previous: Andreas GruenbacherNext: Andreas Gruenbacher
Message 13 of 14 in “Multiple remotes without conflicts”
  1. 0/9 Multiple remotes without conflictsAndreas Gruenbacher, Mar 18, 2010
  2. 1/9 fetch: Check for a "^{}" suffix with suffixcmp()Andreas Gruenbacher, Mar 13, 2010
  3. 2/9 fetch: Properly initialize refspec on stackAndreas Gruenbacher, Mar 12, 2010
  4. 3/9 fetch: Fix minor memory leakAndreas Gruenbacher, Mar 15, 2010
  5. 4/9 fetch: Move deepening fetch check into builtin/fetch.cAndreas Gruenbacher, Mar 16, 2010
  6. 5/9 fetch: Move loop checking which refs we have alreadyAndreas Gruenbacher, Mar 16, 2010
  7. 6/9 fetch: Check if all objects exist after fetchingAndreas Gruenbacher, Mar 16, 2010
  8. 7/9 fetch: Use the same ref map for all branches and tagsAndreas Gruenbacher, Mar 17, 2010
  9. 8/9 fetch: Don't fetch tags twiceAndreas Gruenbacher, Mar 17, 2010
  10. 9/9 fetch: Make automatic tag following work with arbitrary refspecsAndreas Gruenbacher, Mar 17, 2010
  11. Shawn O. PearceMar 18, 2010
  12. Andreas GruenbacherMar 18, 2010
  13. Shawn O. PearceMar 18, 2010
  14. Andreas GruenbacherMar 18, 2010

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.