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

[RFC][PATCH 0/3] Different views on a repository

From
AGAndreas Gruenbacher <agruen@suse.de>
Date
Feb 24, 2010, 16:41 UTC
Message-ID
<cover.1267029680.git.agruen@suse.de>
Hello,

we have a use case with groups of repositories which share lots of objects, but which are logically independent. There is no strict hierarchy between the repositories, the development modl is arbitrary. The alternates mechanism for sharig objects between repositories won't work.

The best idea I came up with so far to solve this was to keep everything in the same repository on the server. Then, to keep the logically independent repositories separate, directories are used below refs/heads and refs/tags. Receive-pack and upload-pack are modified to hide this directory structure from clients so that repositories will continue to look "normal" to users. For example, the following structure on the server:

	refs/heads/one/master
	refs/tags/one/tag1
	refs/heads/two/master
	refs/heads/two/branch2
would appear as two independent repositories to different clients:
	refs/heads/master
	refs/tags/tag1
and:
	refs/heads/master
	refs/heads/branch2

The following three patches implement this. What do you guys think -- does the basic idea and implementation look sensible, or am I overlooking a way to solve this kind of problem with other means?

Thanks!
  receive-pack: Two small code cleanups
  Different views on a repository
  Different views on a repository: HEAD mapping
 Documentation/git-receive-pack.txt |    9 ++++-
 Documentation/git-upload-pack.txt  |   10 +++++-
 builtin-receive-pack.c             |   32 ++++++++++++++---
 refs.c                             |   65 ++++++++++++++++++++++++++++++++++--
 refs.h                             |    4 ++
 upload-pack.c                      |   20 ++++++++++-
 6 files changed, 127 insertions(+), 13 deletions(-)
Next: Andreas Gruenbacher
Message 1 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.