Git development
 help / color / mirror / Atom feed
From: kenneth johansson <ken@kenjo.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: tracking repository
Date: Sun, 16 Mar 2008 21:02:59 +0100	[thread overview]
Message-ID: <1205697779.12760.20.camel@duo> (raw)
In-Reply-To: <7vabkzmltc.fsf@gitster.siamese.dyndns.org>

On Sat, 2008-03-15 at 19:42 -0700, Junio C Hamano wrote:

> You do not want to have any of your own work in this repository, however,
> so there is no reason to separate the remote ones in remotes/origin/
> namespace.  You would want "mirroring".
> 
> You can have in your $GIT_DIR/config something like this:
> 
>         [remote "origin"]
> 		url = $elsewhere
>                 fetch = +refs/heads/*:refs/heads/*

> Modern git allows this setup via "git remote add --mirror"; it is merely a
> convenience wrapper and it is perfectly fine to edit the configuration
> file yourself without using it.

I tried using the option --mirror but then the config end up in a way
that 
all remote repositories master branch maps to exactly the same name. 

However changing the config file manually I did get one that works more
or 
less as I intended. 

So with the below config I can create an empty directory and in that do 
"git --bare init"
copy in the config file and any objects I have laying around. 
then simply put a cron job that once a day do a
"git remote update"

the resulting repository is then possible to clone. And as long as no
repacking is done the object data will be shared. But to share data even
after a repack I guess I need to use GIT_ALTERNATE_OBJECT_DIRECTORIES
for my local clone. And then I need to be very careful when doing any
pruning on the download repository since my local clone could need data
that is no longer needed in the download repository. 

What would a safe procedure be ?? copy all data in the object hierarchy
from the download repository to my local clones then do a gc in them
starting from the download repository. 

------------
[core]
	repositoryformatversion = 0
	filemode = true
	bare = true
[remote "linus"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
	fetch = +refs/heads/*:refs/heads/*
[remote "stable_2.6.12"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.12.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.12_*
[remote "stable_2.6.13"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.13.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.13_*
[remote "stable_2.6.14"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.14.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.14_*
[remote "stable_2.6.15"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.15.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.15_*
[remote "stable_2.6.16"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.16.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.16_*
[remote "stable_2.6.17"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.17.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.17_*
[remote "stable_2.6.18"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.18.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.18_*
[remote "stable_2.6.19"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.19.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.19_*
[remote "stable_2.6.20"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.20.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.20_*
[remote "stable_2.6.21"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.21.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.21_*
[remote "stable_2.6.22"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.22.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.22_*
[remote "stable_2.6.23"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.23.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.23_*
[remote "stable_2.6.24"]
	url =
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.24.y.git
	fetch = +refs/heads/*:refs/heads/stable_2.6.24_*

------------

  reply	other threads:[~2008-03-16 20:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-15 19:35 tracking repository kenneth johansson
2008-03-16  2:42 ` Junio C Hamano
2008-03-16 20:02   ` kenneth johansson [this message]
2008-03-16 20:38     ` Junio C Hamano
2008-03-16 21:28       ` Daniel Barkalow
2008-03-16 21:57         ` Junio C Hamano
2008-03-16 22:18           ` Daniel Barkalow
2008-03-16 22:30             ` Junio C Hamano
2008-03-16 23:01               ` Junio C Hamano
2008-03-16 23:11                 ` Daniel Barkalow
2008-03-17  0:17                   ` Junio C Hamano
2008-03-17  0:35         ` Junio C Hamano
2008-03-17  2:13           ` Daniel Barkalow
2008-03-17  2:37           ` Daniel Barkalow
2008-03-17  7:48             ` Junio C Hamano
2008-03-17 16:23               ` Daniel Barkalow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1205697779.12760.20.camel@duo \
    --to=ken@kenjo.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox