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

Re: [PATCH 2/3] Different views on a repository

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 25, 2010, 17:28 UTC
Message-ID
<7vljeh9qcx.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201002251535.03334.agruen@suse.de>
Andreas Gruenbacher <agruen@suse.de> writes:
> No, it's a server side thing.

If it were a server side thing, then I would expect no change to send/receive pack. Instead your clients will access distinct URL as if they are different repositories.

    git clone git://example.com/pub/scm/git/A
    git push example.com:/pub/scm/git/B master
    git pull http://example.com/pub/scm/git/C

They should not have to care that the server is cheating to save disk space, and they should be able to access your server with Git v1.6.0.

Instead, the server side would:
 - have separate repositories, A, B and C, as normal repositories;
 - these repositories share their object stores by having their
   .git/objects pointing at a shared location via a symlink;
 - on the server side, gc/prune/fsck will have to be updated so that when
   the object store of a repository (say A) is shared with something else,
   they will consider refs in other repositories (B and C) also as the
   root of traversal.

So if this were a server side solution, I would expect the series would add:

 - a way to set up a shared object store;
 - a way to maintain a list of backlinks to repositories that share an
   object store;
 - a way to create a new repository that shares the object store
   (e.g. create a symlink to the shared store instead of having its own
   .git/objects/, and add itself to the list of backlinks for the shared
   object store);
 - a way to retire an existing such repository (rm -rf and remove itself
   from the list of backlinks);
 - update gc/prune/fsck to honor such a list of backlinks.

This would help a "forks" setup commonly seen at places like repo.or.cz and github.com among others.

One thing that is missing from the above handwaving outline that your "different views" offers is a "consolidated view", a pseudo-repository that allows you to see refs from individual real (from the client's and project participant's point of view) repositories as if they are in individual subhierarchies of the ref namespace.

I however suspect that you didn't want such a view in the first place if there weren't issues around reachability. In other words, I suspect that you invented it merely as one possible solution to the reachability issue, and it was not your goal to have such a consolidated view by itself.

Previous: Andreas GruenbacherNext: Andreas Gruenbacher
Message 10 of 16 in “Different views on a repository”
  1. Andreas GruenbacherFeb 24, 2010
  2. 1/3 receive-pack: Two small code cleanupsAndreas Gruenbacher, Feb 24, 2010
  3. 2/3 Different views on a repositoryAndreas Gruenbacher, Feb 24, 2010
  4. 3/3 Different views on a repository: HEAD mappingAndreas Gruenbacher, Feb 24, 2010
  5. Shawn O. PearceFeb 24, 2010
  6. Michael J GruberFeb 25, 2010
  7. Andreas GruenbacherFeb 25, 2010
  8. Michael J GruberFeb 25, 2010
  9. Andreas GruenbacherFeb 25, 2010
  10. Junio C HamanoFeb 25, 2010
  11. Andreas GruenbacherFeb 26, 2010
  12. Andreas GruenbacherFeb 26, 2010
  13. Shawn O. PearceFeb 24, 2010
  14. James PickensFeb 25, 2010
  15. Adam BrewsterFeb 26, 2010
  16. Andreas GruenbacherFeb 26, 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.