Re: Creating objects manually and repack
- From
Jeff King <peff@peff.net>
- Date
- Aug 4, 2006, 03:58 UTC
- Message-ID
- <20060804035803.GA362@coredump.intra.peff.net>
- In-Reply-To
- <9e4733910608032043u689f431rc5408c6d89398142@mail.gmail.com>
On Thu, Aug 03, 2006 at 11:43:42PM -0400, Jon Smirl wrote:
> I've made 500K object files with my cvs2svn front end. This is 500K of > revision files and no tree files. Now I run get-repack. It says done > counting zero objects. What needs to be update so that repack will > find all of my objects?
git-repack starts at your heads and works its way down. You can either:
- make a dummy commit for a tree with all of your blobs:
$ while read sha1; do
echo -e "100644 blob $sha1\t$sha1"
done <list_of_sha1s | git-update-index --index-info
tree=$(git-write-tree)
commit=$(git-commit-tree $tree)
git-update-ref HEAD $commit - call git-pack-objects directly with a list of objects
git-pack-objects .git/objects/pack/pack <list_of_sha1sObviously the latter is simpler, but the former will also make git-fsck-objects happy. Note that they're both untested, so there might be typos.
-Peff