git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* copying objects from another repo?
@ 2007-07-24 10:35 Michael S. Tsirkin
  2007-07-24 11:14 ` Johannes Schindelin
  0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2007-07-24 10:35 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Junio C Hamano, git

I had some missing objects that I managed to locate
in another tree. So - how to get them to my repo?
Here's what I came up with:

cd ~/scm/good_tree
git tag -f foo dfaa7049e9ebe227cfcffc49d3de16716764bcbd
cd ~/scm/bad_tree
git fetch-pack ~/scm/good_tree dfaa7049e9ebe227cfcffc49d3de16716764bcbd

And I repeated this for all missing objects.
But is there a better way to do this?

-- 
MST

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

* Re: copying objects from another repo?
  2007-07-24 10:35 copying objects from another repo? Michael S. Tsirkin
@ 2007-07-24 11:14 ` Johannes Schindelin
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2007-07-24 11:14 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Junio C Hamano, git

Hi,

On Tue, 24 Jul 2007, Michael S. Tsirkin wrote:

> I had some missing objects that I managed to locate
> in another tree. So - how to get them to my repo?
> Here's what I came up with:
> 
> cd ~/scm/good_tree
> git tag -f foo dfaa7049e9ebe227cfcffc49d3de16716764bcbd
> cd ~/scm/bad_tree
> git fetch-pack ~/scm/good_tree dfaa7049e9ebe227cfcffc49d3de16716764bcbd
> 
> And I repeated this for all missing objects.
> But is there a better way to do this?

This is what I have done in such a case:

In the valid repo:

	$ git gc
	$ scp .git/objects/packs/* the-broken:repo.git/objects/packs/

In the broken repo:

	$ git gc

Done.

Hth,
Dscho

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

end of thread, other threads:[~2007-07-24 11:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-24 10:35 copying objects from another repo? Michael S. Tsirkin
2007-07-24 11:14 ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).