Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: Recovering from missing objects?

From: Jeff King <hidden>
Date: 2016-06-15 22:46:14

On Thu, Feb 19, 2009 at 04:29:12PM -0800, Junio C Hamano wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help