{"thread":{"id":"49353","subject":"garbage collection following a \"git remote rm\"?","startedAt":"2018-09-15T14:31:08Z","lastAt":"2018-09-15T16:00:29Z","messageCount":2,"participants":["Robert P. J. Day","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"358187","messageId":"alpine.LFD.2.21.1809151027350.17253@localhost.localdomain","threadId":"49353","inReplyTo":null,"subject":"garbage collection following a \"git remote rm\"?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-09-15T14:31:02Z","receivedAt":"2018-09-15T14:31:08Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"\n  i've never checked before, but i assume that if i add a remote, then\nfetch from it and subsequently remove that remote, all of the\nnow-unreferenced remote tracking branches in the object store will\neventually be discarded by garbage collection, yes?\n\n  is there a command (git fsck?) that would display exclusively\nobjects in the object store corresponding to objects that are suddenly\nunreferenced due to the removal of a remote? i was just curious as it\nwould be neat to demo that in a class.\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                  http://crashcourse.ca/dokuwiki\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n"},{"id":"358189","messageId":"xmqqh8iqagyv.fsf@gitster-ct.c.googlers.com","threadId":"49353","inReplyTo":"alpine.LFD.2.21.1809151027350.17253@localhost.localdomain","subject":"Re: garbage collection following a \"git remote rm\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-09-15T16:00:24Z","receivedAt":"2018-09-15T16:00:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Robert P. J. Day\" <rpjday@crashcourse.ca> writes:\n\n>   is there a command (git fsck?) that would display exclusively\n> objects in the object store corresponding to objects that are suddenly\n> unreferenced due to the removal of a remote?\n\nfsck gives you dangling ones (and can be told to give you\nunreachable ones, too) but the list will be more like \"these are\nunreachable, period\".  It won't be like \"these are the ones that\nrecently became unreacable, and I am not listing ones that were\nunreachable already in N hours ago\".\n\n"}]}