{"thread":{"id":"11041","subject":"ok for git to delete temporary packs on write error?","startedAt":"2007-11-28T07:42:52Z","lastAt":"2007-11-28T15:48:36Z","messageCount":3,"participants":["David Tweed","Nicolas Pitre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"61180","messageId":"e1dab3980711272342x7afad721m113fe21f6879a886@mail.gmail.com","threadId":"11041","inReplyTo":null,"subject":"ok for git to delete temporary packs on write error?","fromName":"David Tweed","fromEmail":"david.tweed@gmail.com","sentAt":"2007-11-28T07:42:52Z","receivedAt":"2007-11-28T07:42:52Z","isPatch":false,"sender":{"key":"david.tweed@gmail.com","avatar":null},"body":"Hi, I'd like to check if there's any reason in the overall design of\ngit which would make deleting tmp_pack's that have suffered\nwrite errors a bad idea? (Before I look further into this I may be missing\na good reason why they shouldn't be auto-deleted.)\n\nMy encounter with this comes from using an almost full\nusbstick which I discovered when I was poking around\nfor other reasons several partial packs from occasions\n(separated by weeks) where gc failed. On each failure\nI'd removed stuff from the drive to clear space and done\na successful gc but hadn't thought to\ncheck below .git for removable stuff so they'd just accumulated.\n\nBelow is a output of a test session:\n\n$ git version\ngit version 1.5.3.6\n\n$ git gc --aggressive --prune\nGenerating pack...\nDone counting 22216 objects.\nDeltifying 22216 objects...\n 100% (22216/22216) done\nWriting 22216 objects...\nfatal: sha1 file '/media/usbdiskc/v.git/objects/tmp_pack_QCYYAi' write\nerror (No space left on device)\nerror: failed to run repack\n\n$ ls -l /media/usbdiskc/v.git/objects/\ntotal 3944\ndrwxr-xr-x 2 sis05dst sis05dst    2048 2007-11-28 07:25 info\ndrwxr-xr-x 2 sis05dst sis05dst    2048 2007-11-28 07:25 pack\n-rwxr-xr-x 1 sis05dst sis05dst 4034560 2007-11-28 07:25 tmp_pack_QCYYAi\n-rw------- 1 sis05dst sis05dst       0 2007-04-18 23:02 tmp_pack_RYLguI\n\n-- \ncheers, dave tweed__________________________\ndavid.tweed@gmail.com\nRm 124, School of Systems Engineering, University of Reading.\n\"we had no idea that when we added templates we were adding a Turing-\ncomplete compile-time language.\" -- C++ standardisation committee\n"},{"id":"61214","messageId":"alpine.LFD.0.99999.0711281000590.9605@xanadu.home","threadId":"11041","inReplyTo":"e1dab3980711272342x7afad721m113fe21f6879a886@mail.gmail.com","subject":"Re: ok for git to delete temporary packs on write error?","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-11-28T15:01:42Z","receivedAt":"2007-11-28T15:01:42Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 28 Nov 2007, David Tweed wrote:\n\n> Hi, I'd like to check if there's any reason in the overall design of\n> git which would make deleting tmp_pack's that have suffered\n> write errors a bad idea? (Before I look further into this I may be missing\n> a good reason why they shouldn't be auto-deleted.)\n> \n> My encounter with this comes from using an almost full\n> usbstick which I discovered when I was poking around\n> for other reasons several partial packs from occasions\n> (separated by weeks) where gc failed. On each failure\n> I'd removed stuff from the drive to clear space and done\n> a successful gc but hadn't thought to\n> check below .git for removable stuff so they'd just accumulated.\n\nI'd suggest they get removed a part of the prune command.\n\n\nNicolas\n"},{"id":"61220","messageId":"e1dab3980711280748s53bf23f4j11be8c0472b7a216@mail.gmail.com","threadId":"11041","inReplyTo":"alpine.LFD.0.99999.0711281000590.9605@xanadu.home","subject":"Re: ok for git to delete temporary packs on write error?","fromName":"David Tweed","fromEmail":"david.tweed@gmail.com","sentAt":"2007-11-28T15:48:36Z","receivedAt":"2007-11-28T15:48:36Z","isPatch":false,"sender":{"key":"david.tweed@gmail.com","avatar":null},"body":"On Nov 28, 2007 3:01 PM, Nicolas Pitre <nico@cam.org> wrote:\n> On Wed, 28 Nov 2007, David Tweed wrote:\n>\n> > Hi, I'd like to check if there's any reason in the overall design of\n> > git which would make deleting tmp_pack's that have suffered\n> > write errors a bad idea? (Before I look further into this I may be missing\n> > a good reason why they shouldn't be auto-deleted.)\n[snip]\n> I'd suggest they get removed a part of the prune command.\n\nMmm, I hadn't looked at the source and spotted the prune\nis actually a separate process to the repack. From a policy\nPOV is it ok to assume any tmp_pack*'s existing when\nprune is run can be deleted? (I know you're not supposed\nto be having any other git ops going on whilst git gc works.)\n\nNow I know they aren't being kept around for, say, \"emergency\nerror recovery\" I may look to see if I can come up with\nan acceptable patch. (Don't hold your breath waiting.)\n\n-- \ncheers, dave tweed__________________________\ndavid.tweed@gmail.com\nRm 124, School of Systems Engineering, University of Reading.\n\"we had no idea that when we added templates we were adding a Turing-\ncomplete compile-time language.\" -- C++ standardisation committee\n"}]}