Re: Tags
- From
Jan Harkes <jaharkes@cs.cmu.edu>
- Date
- Jul 2, 2005, 20:38 UTC
- Message-ID
- <20050702203805.GB19206@delft.aura.cs.cmu.edu>
- In-Reply-To
- <42C5DA77.4030107@zytor.com>
On Fri, Jul 01, 2005 at 05:06:15PM -0700, H. Peter Anvin wrote:
Show 11 quoted lines
> Eric W. Biederman wrote: > > > >If I really care what developer xyz tagged I will pull from them, > >or a mirror I trust. And since developer xyz doesn't pull his > >own global tags from other repositories that should be sufficient. > > > > You're missing something totally and utterly fundamental here: I'm > talking about creating an infrastructure (think sourceforge) where there > is only one git repository for the whole system, period, full stop, end > of story.
I'm not entirely sure what you are envisoning, but it is definitely doable in a secure way.
- Assume that each developer will one or more private trees with one or more branches on kernel.org, lets say all these private repositories are stored under /scm/git/<user>/
- Now you create a single 'global repository' which is going to be the publicly visible one that will be mirrored out,
- Then you run the following script (untested)
#!/bin/sh
GIT_DIR=$global_repo
for user in `(cd /scm/git ; ls)`; do
for tree in `find /scm/git/$user -name *.git` ; do
for ref in `find $tree/refs -type f` ; do
type=`echo $ref | sed 'sX^.*/refs/\([^/]*\)/.*$X\1X'`
name=`echo $ref | sed 'sX^.*/refs/[^/]*/\(.*\)$X\1X'`
git fetch /scm/git/$tree $branch
mkdir -p $GIT_DIR/refs/$type/$user/$name
cat $GIT_DIR/FETCH_HEAD > $GIT_DIR/refs/$type/$user/$name
done
done
done- You can repack the global repository whenever you want. - Finally, once a user knows that all his changes are available from the global repository, he can remove any objects from his tree and use GIT_ALTERNATE_OBJECT_DIRECTORIES=$global_repo/objects (maybe there should be a flag for git prune to removes local objects that are already available in the alternate object directories)
Jan