Git development
 help / color / mirror / Atom feed
From: kenneth johansson <ken@kenjo.org>
To: git@vger.kernel.org
Subject: tracking repository
Date: Sat, 15 Mar 2008 19:35:12 +0000 (UTC)	[thread overview]
Message-ID: <frh8dg$t9j$1@ger.gmane.org> (raw)

I was trying to create a repository used only to track different linux git 
repositories. The goal with this was to maximize object sharing and having 
one local copy of the data. 

But I think I managed to paint myself into a corner. Here was my initial 
setup. 

create a directory 
"mkdir linux"

create a git data base
"cd linux; git --bare init"

Add a few linux repositories with
"git --bare remote add [name] [url]"

then download the objects/branches with
"git remote update"

This works great and it will track all changes in the remote repositories 
without me having to worry about it aborting due to merge issues with my 
local branch or remote  doing rebase on some branch.

The problem is that it is useless :( I can't find any way to use a 
repository with only remotes in it. Is there a way to make a clone of a 
remote branch in a repository ??

Now it is not entirely useless since I can reuse the objects downloaded by 
setting GIT_OBJECT_DIRECTORY. This works quite well until "git gc --prune" 
is used. I leave it up to the reader to figure out what happens then :(

So I guess there should be some warning about using GIT_OBJECT_DIRECTORY 
that points to the same object store for different repositories. It's 
obvious but still a warning in the man page could be helpful.

GIT_ALTERNATE_OBJECT_DIRECTORIES works much better. The only potential 
problem I see is if I set this is set in my environment when I login and 
then do operation on my tracking repository's it will now point into it's 
own object directory. I have not tried that yet.

The downside of only using the objects is that I need to setup the remotes 
again in my clone. 

Now has anybody tried to do something similar? is there a better way?

             reply	other threads:[~2008-03-15 19:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-15 19:35 kenneth johansson [this message]
2008-03-16  2:42 ` tracking repository Junio C Hamano
2008-03-16 20:02   ` kenneth johansson
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='frh8dg$t9j$1@ger.gmane.org' \
    --to=ken@kenjo.org \
    --cc=git@vger.kernel.org \
    /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