Re: How to fetch missing pack

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jörg <joerg@...>
Cc: Christian Couder <chriscool@...>, <git@...>
Date: Thursday, April 24, 2008 - 2:08 am

Christian Couder <chriscool@tuxfamily.org> wrote:

If you know the name of the objects you are missing, you can
make a temporary pack to transfer the list of objects:

	# at good repo
	#
	git pack-objects --stdout <object.list >save.pack

	# at bad repo
	#
	git index-pack --stdin <save.pack

Make object.list just one SHA-1 per line.  The resulting pack is
not likely to be highly compressed, as it will probably contain
a non-delta version of each object, but its faster to create than
calling git-cat-file for each object, and may give you a smaller
pack than just copying everything as the FAQ entry recommends.

Note that you may need to do this several times; e.g. if you are
missing a tree you won't know what blobs you are missing until
you load the tree and run fsck --full again to parse the tree and
discover the missing blobs.  This iterative copying approach is
what the FAQ avoids when it suggests you copy everything.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: How to fetch missing pack, Jörg, (Wed Apr 23, 4:55 pm)
Re: How to fetch missing pack, Christian Couder, (Thu Apr 24, 2:01 am)
Re: How to fetch missing pack, Shawn O. Pearce, (Thu Apr 24, 2:08 am)
Re: git doesn't finds the parent of a commit (was: How to fe..., Stephen R. van den Berg, (Sun Apr 27, 1:37 pm)
Re: git doesn't finds the parent of a commit, Junio C Hamano, (Sun Apr 27, 4:18 pm)
Re: git doesn't finds the parent of a commit, Stephen R. van den Berg, (Sun Apr 27, 5:46 pm)