Git development
 help / color / mirror / Atom feed
* tracking repository
@ 2008-03-15 19:35 kenneth johansson
  2008-03-16  2:42 ` Junio C Hamano
  0 siblings, 1 reply; 16+ messages in thread
From: kenneth johansson @ 2008-03-15 19:35 UTC (permalink / raw)
  To: git

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?

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-03-17 16:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-15 19:35 tracking repository kenneth johansson
2008-03-16  2:42 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox