Skip to content

RFC Different views on a repository

Andreas Gruenbacher git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3receive-pack: Two small code cleanupsbuiltin-receive-pack.c+6 -61 reply
2/3Different views on a repositoryDocumentation/git-receive-pack.txt Documentation/git-upload-pack.txt builtin-receive-pack.c +3 more+93 -28 replies
3/3Different views on a repository: HEAD mappingDocumentation/git-receive-pack.txt Documentation/git-upload-pack.txt refs.c +2 more+35 -120 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchShawn O. Pearce
1/3A-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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(-)