From: Alex Riesen Date: Wed, 19 Nov 2008 13:30:52 GMT Subject: Re: [PATCH] Fix handle leak in builtin-pack-objects Message-ID: <81b0412b0811190530m79a11b9dx3771b9679e53e9e@mail.gmail.com> In-Reply-To: 2008/11/19 Nicolas Pitre : > On Wed, 19 Nov 2008, Alex Riesen wrote: > >> The opened packs seem to stay open forever. >> >> Signed-off-by: Alex Riesen >> --- >> >> I'm very unsure about the solution, though: it is really horrible code >> to debug... > > What is the actual problem? Pack windows are left open on purpose. > * expecting success: do_repack && git prune-packed -v && git verify-pack ${pack}.pack && git cat-file blob $blob_1 > /dev/null && git cat-file blob $blob_2 > /dev/null && git cat-file blob $blob_3 > /dev/null Counting objects: 3, done. error: unknown object type 0 at offset 2032 in .git/objects/pack/pack-8d1e04fc992cfbdb3ab72cf7abbf08cce8b1900.pack Compressing objects: 100% (2/2), done. fatal: unable to rename temporary pack file .git/objects/pack/tmp_pack_s9Gijm->.git/objects/pack/pack-b8d1e04fc992cfbdbab72cf7abbf08cce8b1900.pack: Permission denied * FAIL 10: ... and then a repack "clears" the corruption do_repack && git prune-packed -v && git verify-pack ${pack}.pack && git cat-file blob $blob_1 > /dev/null && git cat-file blob $blob_2 > /dev/null && git cat-file blob $blob_3 > /dev/null