{"thread":{"id":"16497","subject":"Dangling blob after git gc","startedAt":"2008-11-27T13:30:27Z","lastAt":"2008-11-27T13:53:42Z","messageCount":3,"participants":["Miklos Vajna","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"96619","messageId":"20081127133027.GW4746@genesis.frugalware.org","threadId":"16497","inReplyTo":null,"subject":"Dangling blob after git gc","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-11-27T13:30:27Z","receivedAt":"2008-11-27T13:30:27Z","isPatch":false,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"Hi,\n\n$ git version\ngit version 1.6.0.4\n\n$ git fsck\ndangling blob 070011dddba40fe0066cbebfe51ea6d160f95af8\ndangling blob 3ec00c535bbac37f738971a5ad14bb11892c5863\ndangling commit c180face4d2451f9e77f41d4f9d4f3ad7cbd51c0\n(...)\n\nSo I have multiple dangling blobs/trees/commits, let's do a gc.\n\n$ git gc\nCounting objects: 96978, done.\nCompressing objects: 100% (25044/25044), done.\nWriting objects: 100% (96978/96978), done.\nTotal 96978 (delta 70392), reused 96978 (delta 70392)\n\n$ git fsck\ndangling commit 2302e3fd37e808d3240ffa887ea1c22cac9cb770\ndangling commit 0a2bc7013d49e0695242ffc2d57360d0396c22ea\ndangling blob c330f89bcc20b1c9ca689e66062d086562e0633d\ndangling commit ac319ab8d187e818f2dd05774175a2a7feb9696e\ndangling commit a5f5b7956f7d63bab13d3f2c45c7315cfbea28b8\n\nThe commits are probably due to reflogs, that's OK. But why do I have a\ndangling blob after git gc? The interesting part is that as you can see\nmost of them is removed, but not all.\n\nAny ideas? :)\n\nThanks.\n"},{"id":"96623","messageId":"vpqzljlnuwo.fsf@bauges.imag.fr","threadId":"16497","inReplyTo":"20081127133027.GW4746@genesis.frugalware.org","subject":"Re: Dangling blob after git gc","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2008-11-27T13:46:47Z","receivedAt":"2008-11-27T13:46:47Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Miklos Vajna <vmiklos@frugalware.org> writes:\n\n> The commits are probably due to reflogs, that's OK. But why do I have a\n> dangling blob after git gc? The interesting part is that as you can see\n> most of them is removed, but not all.\n>\n> Any ideas? :)\n\nfrom man git-gc:\n\n     The optional configuration variable gc.pruneExpire controls\n     how old the unreferenced loose objects have to be before\n     they are pruned. The default is \"2 weeks ago\".\n\nGit can hardly know for sure whether a dangling object is actually a\ntemporary object used by another instance of git or actually an unused\nobject. Older versions of Git required you to explicitely say --prune\nto mean \"OK, _I_ am sure, you can prune the objects\", newer do it the\nsafe way by removing only objects old enough.\n\n-- \nMatthieu\n"},{"id":"96624","messageId":"20081127135342.GX4746@genesis.frugalware.org","threadId":"16497","inReplyTo":"vpqzljlnuwo.fsf@bauges.imag.fr","subject":"Re: Dangling blob after git gc","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-11-27T13:53:42Z","receivedAt":"2008-11-27T13:53:42Z","isPatch":false,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Thu, Nov 27, 2008 at 02:46:47PM +0100, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n> from man git-gc:\n> \n>      The optional configuration variable gc.pruneExpire controls\n>      how old the unreferenced loose objects have to be before\n>      they are pruned. The default is \"2 weeks ago\".\n> \n> Git can hardly know for sure whether a dangling object is actually a\n> temporary object used by another instance of git or actually an unused\n> object. Older versions of Git required you to explicitely say --prune\n> to mean \"OK, _I_ am sure, you can prune the objects\", newer do it the\n> safe way by removing only objects old enough.\n\nSo it was a user error, thanks for pointing out the relevant\ndocumentation. :)\n"}]}