{"thread":{"id":"3028","subject":"killing a branch","startedAt":"2006-01-10T10:22:07Z","lastAt":"2006-01-10T18:59:32Z","messageCount":7,"participants":["Jens Axboe","Junio C Hamano","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14401","messageId":"20060110102207.GP3389@suse.de","threadId":"3028","inReplyTo":null,"subject":"killing a branch","fromName":"Jens Axboe","fromEmail":"axboe@suse.de","sentAt":"2006-01-10T10:22:07Z","receivedAt":"2006-01-10T10:22:07Z","isPatch":false,"sender":{"key":"axboe@kernel.dk","avatar":null},"body":"Hi,\n\nWhen I need to delete a branch from my git tree, I'm currently using\nthis (slooow) approach:\n\n$ rm .git/refs/heads/branch-name\n$ git prune\n\nto rid myself of the branch and associated objects. Is there a faster\napproach?\n\n(please cc me, not on the list)\n\n-- \nJens Axboe\n"},{"id":"14402","messageId":"7vr77g8jm4.fsf@assigned-by-dhcp.cox.net","threadId":"3028","inReplyTo":"20060110102207.GP3389@suse.de","subject":"Re: killing a branch","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-10T10:25:55Z","receivedAt":"2006-01-10T10:25:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jens Axboe <axboe@suse.de> writes:\n\n> $ rm .git/refs/heads/branch-name\n> $ git prune\n>\n> to rid myself of the branch and associated objects. Is there a faster\n> approach?\n\nPerhaps the \"official\" way is\n\n\t$ git branch -d branch-name ;# you may need -D\n        $ git prune\n\nbut that essentially is the same as what you are doing.  Note\nthat having dangling objects in your repository is not a crime,\nand you do not have to religiously do \"git prune\" every time.\n"},{"id":"14403","messageId":"20060110103533.GT3389@suse.de","threadId":"3028","inReplyTo":"7vr77g8jm4.fsf@assigned-by-dhcp.cox.net","subject":"Re: killing a branch","fromName":"Jens Axboe","fromEmail":"axboe@suse.de","sentAt":"2006-01-10T10:35:33Z","receivedAt":"2006-01-10T10:35:33Z","isPatch":false,"sender":{"key":"axboe@kernel.dk","avatar":null},"body":"On Tue, Jan 10 2006, Junio C Hamano wrote:\n> Jens Axboe <axboe@suse.de> writes:\n> \n> > $ rm .git/refs/heads/branch-name\n> > $ git prune\n> >\n> > to rid myself of the branch and associated objects. Is there a faster\n> > approach?\n> \n> Perhaps the \"official\" way is\n> \n> \t$ git branch -d branch-name ;# you may need -D\n>         $ git prune\n> \n> but that essentially is the same as what you are doing.  Note\n\nSo no time saved there :-)\n\n> that having dangling objects in your repository is not a crime,\n> and you do not have to religiously do \"git prune\" every time.\n\nI know, it just doesn't feel nice!\n\n-- \nJens Axboe\n"},{"id":"14404","messageId":"7vy81o73t2.fsf@assigned-by-dhcp.cox.net","threadId":"3028","inReplyTo":"20060110103533.GT3389@suse.de","subject":"Re: killing a branch","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-10T10:52:41Z","receivedAt":"2006-01-10T10:52:41Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jens Axboe <axboe@suse.de> writes:\n\n>> that having dangling objects in your repository is not a crime,\n>> and you do not have to religiously do \"git prune\" every time.\n>\n> I know, it just doesn't feel nice!\n\nSorry, but I can think of only three reasons (and a half) why\nsomebody cannot live with \"one git prune at the end of the day\nbefore leaving\" (or \"week\" for that matter) workflow:\n\n * the filesystem quota is too tight and you cannot afford to\n   leave unused loose objects around.  May still be true on\n   student accounts, perhaps, but I doubt this is much of an\n   issue in the modern world anymore.\n\n * rsync is used to sync from a repository that dropped a branch\n   just now, and you do not want to push the garbage out.  Well,\n   if you are still using rsync, I'll tell about it to Linus ;-)\n   Pushing via git native protocol over ssh would not send\n   unreferenced objects out and will not contaminate the other\n   end with the garbage.\n\n * you do not want to leave after starting prune before it\n   finishes.  If it is your hobby to watch the paint dry, I\n   cannot help you, but you could run prune under nohup (or\n   always work inside \"screen\", which is what I do).\n\n + having unused things on the disk just does not _feel_ right.\n   Well, maybe.  I can argue with a reason but not with a\n   feeling.  On a bright side, leaving recently abandoned\n   objects around for a while lets you run git-lost-found to\n   recover if you accidentally deleted a still-useful branch.\n"},{"id":"14405","messageId":"20060110112608.GU3389@suse.de","threadId":"3028","inReplyTo":"7vy81o73t2.fsf@assigned-by-dhcp.cox.net","subject":"Re: killing a branch","fromName":"Jens Axboe","fromEmail":"axboe@suse.de","sentAt":"2006-01-10T11:26:09Z","receivedAt":"2006-01-10T11:26:09Z","isPatch":false,"sender":{"key":"axboe@kernel.dk","avatar":null},"body":"On Tue, Jan 10 2006, Junio C Hamano wrote:\n> Jens Axboe <axboe@suse.de> writes:\n> \n> >> that having dangling objects in your repository is not a crime,\n> >> and you do not have to religiously do \"git prune\" every time.\n> >\n> > I know, it just doesn't feel nice!\n> \n> Sorry, but I can think of only three reasons (and a half) why\n> somebody cannot live with \"one git prune at the end of the day\n> before leaving\" (or \"week\" for that matter) workflow:\n> \n>  * the filesystem quota is too tight and you cannot afford to\n>    leave unused loose objects around.  May still be true on\n>    student accounts, perhaps, but I doubt this is much of an\n>    issue in the modern world anymore.\n\nYeah obviously not true.\n\n>  * rsync is used to sync from a repository that dropped a branch\n>    just now, and you do not want to push the garbage out.  Well,\n>    if you are still using rsync, I'll tell about it to Linus ;-)\n>    Pushing via git native protocol over ssh would not send\n>    unreferenced objects out and will not contaminate the other\n>    end with the garbage.\n\nHaven't used rsync in a long time, I use git:// and ssh:// exclusively.\n\n>  * you do not want to leave after starting prune before it\n>    finishes.  If it is your hobby to watch the paint dry, I\n>    cannot help you, but you could run prune under nohup (or\n>    always work inside \"screen\", which is what I do).\n> \n>  + having unused things on the disk just does not _feel_ right.\n>    Well, maybe.  I can argue with a reason but not with a\n>    feeling.  On a bright side, leaving recently abandoned\n>    objects around for a while lets you run git-lost-found to\n>    recover if you accidentally deleted a still-useful branch.\n\n:-)\n\nAlright, I'll just have to shake the habit of running git prune to rid\nmyself of that dirty dirty feeling.\n\n-- \nJens Axboe\n"},{"id":"14415","messageId":"Pine.LNX.4.64.0601100910530.4939@g5.osdl.org","threadId":"3028","inReplyTo":"20060110112608.GU3389@suse.de","subject":"Re: killing a branch","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-01-10T17:12:53Z","receivedAt":"2006-01-10T17:12:53Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 10 Jan 2006, Jens Axboe wrote:\n> \n> Alright, I'll just have to shake the habit of running git prune to rid\n> myself of that dirty dirty feeling.\n\nYeah, I'm slowly shaking it off too. I used to run git-fsck-objects \nreligiously just because I worried about bugs. I still do it, but \nespecially with the recursive-strategy merging, I get \"dangling blob\" \nmessages every once in a while that are _not_ due to bugs, but just due to \nthe temporary merge object.\n\nSo I'm learning to ignore them, and prune the tree only occasionally, \ninstead of compulsively every time.\n\n\t\tLinus\n"},{"id":"14421","messageId":"20060110185932.GW3389@suse.de","threadId":"3028","inReplyTo":"Pine.LNX.4.64.0601100910530.4939@g5.osdl.org","subject":"Re: killing a branch","fromName":"Jens Axboe","fromEmail":"axboe@suse.de","sentAt":"2006-01-10T18:59:32Z","receivedAt":"2006-01-10T18:59:32Z","isPatch":false,"sender":{"key":"axboe@kernel.dk","avatar":null},"body":"On Tue, Jan 10 2006, Linus Torvalds wrote:\n> \n> \n> On Tue, 10 Jan 2006, Jens Axboe wrote:\n> > \n> > Alright, I'll just have to shake the habit of running git prune to rid\n> > myself of that dirty dirty feeling.\n> \n> Yeah, I'm slowly shaking it off too. I used to run git-fsck-objects \n> religiously just because I worried about bugs. I still do it, but \n> especially with the recursive-strategy merging, I get \"dangling blob\" \n> messages every once in a while that are _not_ due to bugs, but just due to \n> the temporary merge object.\n> \n> So I'm learning to ignore them, and prune the tree only occasionally, \n> instead of compulsively every time.\n\nCompulsive is the right word, it just itches to run the prune after\nkilling a branch... I'll try and learn as well.\n\n-- \nJens Axboe\n"}]}