{"thread":{"id":"7112","subject":"git gc and git repack","startedAt":"2007-03-06T16:13:03Z","lastAt":"2007-03-06T21:13:19Z","messageCount":2,"participants":["Sergio Callegari","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"36467","messageId":"loom.20070306T165455-693@post.gmane.org","threadId":"7112","inReplyTo":null,"subject":"git gc and git repack","fromName":"Sergio Callegari","fromEmail":"scallegari@arces.unibo.it","sentAt":"2007-03-06T16:13:03Z","receivedAt":"2007-03-06T16:13:03Z","isPatch":false,"sender":{"key":"scallegari@arces.unibo.it","avatar":null},"body":"Hi,\n\nI am puzzled by a different behavior when doing housekeeping with git-gc and\ngit-repack:\n\nOn a repository I have, git gc gives:\n\nGenerating pack...\nDone counting 75 objects.\nDeltifying 75 objects.\n 100% (75/75) done\nWriting 75 objects.\n 100% (75/75) done\nTotal 75 (delta 26), reused 68 (delta 26)\nPack pack-a989a4c4c7454874220cf502865ab9a28952499f created.\nRemoving unused objects 100%...\nDone.\n\nwhile git repack -a -d gives\n\nGenerating pack...\nDone counting 143 objects.\nDeltifying 143 objects.\n 100% (143/143) done\nWriting 143 objects.\n 100% (143/143) done\nTotal 143 (delta 49), reused 120 (delta 31)\nPack pack-d17fd54437f04fbde34088909e31e95718e7b8c5 created.\nRemoving unused objects 100%...\nDone.\n\nWhy is a different number of objects being considered in the two case, with git\nrepack considering more objects and producing a different pack? Also, the\npackage produced by repack turns out to be much larger than the one by git gc...\nIn any case, both packages turn out to be git-fsck clean...\n\nI suspect, this has to to with my repository using alternates... (in fact git-gc\nand git-repack start behaving identically if I pass the -l (local) option to\nrepack...  can anyone confirm that this is the only difference?\n\nAlso can anybody confirm whether git repack -a -d actually includes in the pack\nalso _all_ the \"borrowed\" objects? I.e. if it is in fact a way to convert a\nrepository that borrows objects into one that is self-standing?\n"},{"id":"36472","messageId":"Pine.LNX.4.63.0703062211450.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7112","inReplyTo":"loom.20070306T165455-693@post.gmane.org","subject":"Re: git gc and git repack","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-06T21:13:19Z","receivedAt":"2007-03-06T21:13:19Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 6 Mar 2007, Sergio Callegari wrote:\n\n> I am puzzled by a different behavior when doing housekeeping with git-gc and\n> git-repack:\n>\n> [...] \n> Done counting 75 objects.\n> [...]\n>\n> while git repack -a -d gives\n> \n> Done counting 143 objects.\n> \n> I suspect, this has to to with my repository using alternates... (in \n> fact git-gc and git-repack start behaving identically if I pass the -l \n> (local) option to repack...  can anyone confirm that this is the only \n> difference?\n\nYes. And if you look in git-gc, you'll see as to why: it uses the -l flag.\n\n> Also can anybody confirm whether git repack -a -d actually includes in \n> the pack also _all_ the \"borrowed\" objects? I.e. if it is in fact a way \n> to convert a repository that borrows objects into one that is \n> self-standing?\n\nYes exactly.\n\nCiao,\nDscho\n"}]}