{"thread":{"id":"9200","subject":"copying objects from another repo?","startedAt":"2007-07-24T10:35:03Z","lastAt":"2007-07-24T11:14:08Z","messageCount":2,"participants":["Michael S. Tsirkin","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"48431","messageId":"20070724103503.GC18701@mellanox.co.il","threadId":"9200","inReplyTo":null,"subject":"copying objects from another repo?","fromName":"Michael S. Tsirkin","fromEmail":"mst@dev.mellanox.co.il","sentAt":"2007-07-24T10:35:03Z","receivedAt":"2007-07-24T10:35:03Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"I had some missing objects that I managed to locate\nin another tree. So - how to get them to my repo?\nHere's what I came up with:\n\ncd ~/scm/good_tree\ngit tag -f foo dfaa7049e9ebe227cfcffc49d3de16716764bcbd\ncd ~/scm/bad_tree\ngit fetch-pack ~/scm/good_tree dfaa7049e9ebe227cfcffc49d3de16716764bcbd\n\nAnd I repeated this for all missing objects.\nBut is there a better way to do this?\n\n-- \nMST\n"},{"id":"48440","messageId":"Pine.LNX.4.64.0707241213000.14781@racer.site","threadId":"9200","inReplyTo":"20070724103503.GC18701@mellanox.co.il","subject":"Re: copying objects from another repo?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-24T11:14:08Z","receivedAt":"2007-07-24T11:14:08Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 24 Jul 2007, Michael S. Tsirkin wrote:\n\n> I had some missing objects that I managed to locate\n> in another tree. So - how to get them to my repo?\n> Here's what I came up with:\n> \n> cd ~/scm/good_tree\n> git tag -f foo dfaa7049e9ebe227cfcffc49d3de16716764bcbd\n> cd ~/scm/bad_tree\n> git fetch-pack ~/scm/good_tree dfaa7049e9ebe227cfcffc49d3de16716764bcbd\n> \n> And I repeated this for all missing objects.\n> But is there a better way to do this?\n\nThis is what I have done in such a case:\n\nIn the valid repo:\n\n\t$ git gc\n\t$ scp .git/objects/packs/* the-broken:repo.git/objects/packs/\n\nIn the broken repo:\n\n\t$ git gc\n\nDone.\n\nHth,\nDscho\n"}]}