{"thread":{"id":"4019","subject":"git-unpack-objects","startedAt":"2006-05-01T22:52:44Z","lastAt":"2006-05-04T11:58:16Z","messageCount":9,"participants":["Josh Boyer","Junio C Hamano","Linus Torvalds","Marco Roeland"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"19338","messageId":"625fc13d0605011552j4189338bx14083657acffc18e@mail.gmail.com","threadId":"4019","inReplyTo":null,"subject":"git-unpack-objects","fromName":"Josh Boyer","fromEmail":"jwboyer@gmail.com","sentAt":"2006-05-01T22:52:44Z","receivedAt":"2006-05-01T22:52:44Z","isPatch":false,"sender":{"key":"jwboyer@gmail.com","avatar":null},"body":"I was playing around with git repack and decided to \"undo\" the repack\nI did using git-unpack objects.  Below is the output:\n\n[jwboyer@vader linux-2.6]$ git-unpack-objects <\n.git/objects/pack/pack-497d1e639572013de48eeb00cb95738d2ca959e1.pack\nUnpacking 236950 objects\n 100% (236950/236950) done\n[jwboyer@vader linux-2.6]$ ls -l .git/objects/\ntotal 8\ndrwxrwxr-x 2 jwboyer jwboyer 4096 May  1 17:48 info\ndrwxrwxr-x 2 jwboyer jwboyer 4096 May  1 17:48 pack\n[jwboyer@vader linux-2.6]$\n\n\nAs you can see, the objects don't seem to get unpacked back into the\n.git directory.  So either I am misunderstanding what that command is\nsupposed to do, or it isn't working properly.\n\nAny ideas?\n\nthx,\njosh\n"},{"id":"19340","messageId":"7vu089qr4t.fsf@assigned-by-dhcp.cox.net","threadId":"4019","inReplyTo":"625fc13d0605011552j4189338bx14083657acffc18e@mail.gmail.com","subject":"Re: git-unpack-objects","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-01T23:09:22Z","receivedAt":"2006-05-01T23:09:22Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Josh Boyer\" <jwboyer@gmail.com> writes:\n\n> I was playing around with git repack and decided to \"undo\" the repack\n> I did using git-unpack objects.  Below is the output:\n>\n> [jwboyer@vader linux-2.6]$ git-unpack-objects <\n> .git/objects/pack/pack-497d1e639572013de48eeb00cb95738d2ca959e1.pack\n> Unpacking 236950 objects\n> 100% (236950/236950) done\n> [jwboyer@vader linux-2.6]$ ls -l .git/objects/\n> total 8\n> drwxrwxr-x 2 jwboyer jwboyer 4096 May  1 17:48 info\n> drwxrwxr-x 2 jwboyer jwboyer 4096 May  1 17:48 pack\n> [jwboyer@vader linux-2.6]$\n>\n> As you can see, the objects don't seem to get unpacked back into the\n> .git directory.  So either I am misunderstanding what that command is\n> supposed to do, or it isn't working properly.\n>\n> Any ideas?\n\nunpack tries to unpack and if it already has the object it\nskips.\n\nIf you really wanted to do it, here is a way to do so.\n\n\tmv .git/objets/pack/pack-49*.pack \\\n\t\t.git/objets/pack/pack-49*.idx .\n\tgit unpack-objects <pack-49*.pack\n"},{"id":"19451","messageId":"625fc13d0605031035l721ab08dmee6f870abb49f4e4@mail.gmail.com","threadId":"4019","inReplyTo":"7vu089qr4t.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-unpack-objects","fromName":"Josh Boyer","fromEmail":"jwboyer@gmail.com","sentAt":"2006-05-03T17:35:54Z","receivedAt":"2006-05-03T17:35:54Z","isPatch":false,"sender":{"key":"jwboyer@gmail.com","avatar":null},"body":"On 5/1/06, Junio C Hamano <junkio@cox.net> wrote:\n>\n> unpack tries to unpack and if it already has the object it\n> skips.\n>\n> If you really wanted to do it, here is a way to do so.\n>\n>         mv .git/objets/pack/pack-49*.pack \\\n>                 .git/objets/pack/pack-49*.idx .\n>         git unpack-objects <pack-49*.pack\n\nHm..  so it seems that git-unpack-objects is more intended to unpack a\npack one has gotten with git-fetch-pack, right?\n\nI was looking for something more along the lines of an\n\"un-git-repack\", where you have existing pack(s) and want to undo\nthem.  Maybe you want to repack everything into a single pack or\nsomething like that.\n\njosh\n"},{"id":"19453","messageId":"Pine.LNX.4.64.0605031041150.4086@g5.osdl.org","threadId":"4019","inReplyTo":"625fc13d0605031035l721ab08dmee6f870abb49f4e4@mail.gmail.com","subject":"Re: git-unpack-objects","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-03T17:41:51Z","receivedAt":"2006-05-03T17:41:51Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 3 May 2006, Josh Boyer wrote:\n> \n> Hm..  so it seems that git-unpack-objects is more intended to unpack a\n> pack one has gotten with git-fetch-pack, right?\n\nYeah. And for testing. I don't think it ever gets used directly.\n\n> I was looking for something more along the lines of an\n> \"un-git-repack\", where you have existing pack(s) and want to undo\n> them.  Maybe you want to repack everything into a single pack or\n> something like that.\n\nThat's what you just do \"git repack -a -d\" for.\n\n\t\tLinus\n"},{"id":"19454","messageId":"625fc13d0605031044y2ff03ed2h261db5455b234254@mail.gmail.com","threadId":"4019","inReplyTo":"Pine.LNX.4.64.0605031041150.4086@g5.osdl.org","subject":"Re: git-unpack-objects","fromName":"Josh Boyer","fromEmail":"jwboyer@gmail.com","sentAt":"2006-05-03T17:44:18Z","receivedAt":"2006-05-03T17:44:18Z","isPatch":false,"sender":{"key":"jwboyer@gmail.com","avatar":null},"body":"On 5/3/06, Linus Torvalds <torvalds@osdl.org> wrote:\n>\n>\n> On Wed, 3 May 2006, Josh Boyer wrote:\n> >\n> > Hm..  so it seems that git-unpack-objects is more intended to unpack a\n> > pack one has gotten with git-fetch-pack, right?\n>\n> Yeah. And for testing. I don't think it ever gets used directly.\n>\n> > I was looking for something more along the lines of an\n> > \"un-git-repack\", where you have existing pack(s) and want to undo\n> > them.  Maybe you want to repack everything into a single pack or\n> > something like that.\n>\n> That's what you just do \"git repack -a -d\" for.\n\nBut that doesn't roll exsisting packs into a new pack, does it?  I\nthought it just packed loose objects into a new pack and deleted them.\n I ran that on a repo that already had a couple packs in it, and the\nold packs were still there.\n\njosh\n"},{"id":"19456","messageId":"Pine.LNX.4.64.0605031054300.4086@g5.osdl.org","threadId":"4019","inReplyTo":"625fc13d0605031044y2ff03ed2h261db5455b234254@mail.gmail.com","subject":"Re: git-unpack-objects","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-03T17:56:37Z","receivedAt":"2006-05-03T17:56:37Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 3 May 2006, Josh Boyer wrote:\n> > \n> > That's what you just do \"git repack -a -d\" for.\n> \n> But that doesn't roll exsisting packs into a new pack, does it? \n\nIt does. That's what the \"-a\" (for \"all\") does.\n\nI don't personally do incremental packs at all - the full repack is fast \nenough on the hardware I use (especially since Junio just kicked it into \nsome serious performance shape) that I don't have the need for \nincrementals. \n\n\t\tLinus\n"},{"id":"19483","messageId":"625fc13d0605031731v7b65a738r6fc0169958235928@mail.gmail.com","threadId":"4019","inReplyTo":"Pine.LNX.4.64.0605031054300.4086@g5.osdl.org","subject":"Re: git-unpack-objects","fromName":"Josh Boyer","fromEmail":"jwboyer@gmail.com","sentAt":"2006-05-04T00:31:12Z","receivedAt":"2006-05-04T00:31:12Z","isPatch":false,"sender":{"key":"jwboyer@gmail.com","avatar":null},"body":"On 5/3/06, Linus Torvalds <torvalds@osdl.org> wrote:\n>\n>\n> On Wed, 3 May 2006, Josh Boyer wrote:\n> > >\n> > > That's what you just do \"git repack -a -d\" for.\n> >\n> > But that doesn't roll exsisting packs into a new pack, does it?\n>\n> It does. That's what the \"-a\" (for \"all\") does.\n\nOdd.  On one of my repos, I was seeing the correct behavior.  On\nanother, there were multiple packs left after doing the 'git repack -a\n-d'.  Were there ever some packing bugs in older versions of git that\nwould have maybe produced some packs that wouldn't get deleted or\nsomething?\n\nAt any rate, the above command does seem to do exactly what I want. \nThanks for the help.\n\njosh\n"},{"id":"19510","messageId":"20060504100237.GA10548@fiberbit.xs4all.nl","threadId":"4019","inReplyTo":"625fc13d0605031731v7b65a738r6fc0169958235928@mail.gmail.com","subject":"Re: git-unpack-objects","fromName":"Marco Roeland","fromEmail":"marco.roeland@xs4all.nl","sentAt":"2006-05-04T10:02:37Z","receivedAt":"2006-05-04T10:02:37Z","isPatch":false,"sender":{"key":"marco.roeland@xs4all.nl","avatar":null},"body":"On Wednesday May 3rd 2006 Josh Boyer wrote:\n\n> >It does. That's what the \"-a\" (for \"all\") does.\n> \n> Odd.  On one of my repos, I was seeing the correct behavior.  On\n> another, there were multiple packs left after doing the 'git repack -a\n> -d'.  Were there ever some packing bugs in older versions of git that\n> would have maybe produced some packs that wouldn't get deleted or\n> something?\n\nHave you checked with \"git fsck-objects\" that maybe the \"remaining\"\npacks contained non-reachable objects like dangling commits from resets\nor from following volatile branches like +pu?\n-- \nMarco Roeland\n"},{"id":"19513","messageId":"625fc13d0605040458q1018c7ccl79e8effe23edf7d8@mail.gmail.com","threadId":"4019","inReplyTo":"20060504100237.GA10548@fiberbit.xs4all.nl","subject":"Re: git-unpack-objects","fromName":"Josh Boyer","fromEmail":"jwboyer@gmail.com","sentAt":"2006-05-04T11:58:16Z","receivedAt":"2006-05-04T11:58:16Z","isPatch":false,"sender":{"key":"jwboyer@gmail.com","avatar":null},"body":"On 5/4/06, Marco Roeland <marco.roeland@xs4all.nl> wrote:\n> On Wednesday May 3rd 2006 Josh Boyer wrote:\n>\n> > >It does. That's what the \"-a\" (for \"all\") does.\n> >\n> > Odd.  On one of my repos, I was seeing the correct behavior.  On\n> > another, there were multiple packs left after doing the 'git repack -a\n> > -d'.  Were there ever some packing bugs in older versions of git that\n> > would have maybe produced some packs that wouldn't get deleted or\n> > something?\n>\n> Have you checked with \"git fsck-objects\" that maybe the \"remaining\"\n> packs contained non-reachable objects like dangling commits from resets\n> or from following volatile branches like +pu?\n\nThis was on a kernel repo, so no branches.  But dangling commits from\nresets might have been present.  I can't tell now since I undid all\nthat packs and redid them into a single.  Thanks for the suggestion\nthough, that sounds like a perfectly reasonable explanation.\n\njosh\n"}]}