Re: Recovering from missing objects?
- From
Jeff King <peff@peff.net>
- Date
- Feb 20, 2009, 02:58 UTC
- Message-ID
- <20090220025810.GB22419@coredump.intra.peff.net>
- In-Reply-To
- <7vvdr6j6hz.fsf@gitster.siamese.dyndns.org>
On Thu, Feb 19, 2009 at 04:29:12PM -0800, Junio C Hamano wrote:
Show 13 quoted lines
> > If I clone the remote repository, I have the object in the new clone. > > However, how do I get the missing object back into the .git directory of my > > working repository? > [...] > In the new clone: > > $ IT=c406ab0be69c912ea59233595a071478103cdad8 > $ H=$(git rev-list --objects $IT | git pack-objects mine) > $ mv mine-$H.pack /var/tmp > > Go to the repository that lacks the object and then > > $ git unpack-objects </var/tmp/mine-$H.pack
Might it not be simpler to just copy or hardlink the pack from the new clone into the old directory's .git/objects/pack? That will get more than you need, but things should start working, at which point a "git repack -a -d" will make it small again.
Or am I misunderstanding something?
-Peff