{"thread":{"id":"4225","subject":"dangling commits.","startedAt":"2006-05-20T23:05:31Z","lastAt":"2006-05-20T23:49:11Z","messageCount":4,"participants":["Dave Jones","Sean","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"20347","messageId":"20060520230531.GA27511@redhat.com","threadId":"4225","inReplyTo":null,"subject":"dangling commits.","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2006-05-20T23:05:31Z","receivedAt":"2006-05-20T23:05:31Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"What's wrong here?\n\n(tmp)$ mkdir git\n(tmp)$ cd git\n(git)$ rsync -azq rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/git.git/ .git\n(git)$ git-fsck-objects --full\ndangling commit fc024e5e1b92fb11d11aa3c15e9e3f92a888acb6\ndangling commit be49def3dd524b241e3f14c657e740f2e4d73d39\ndangling commit e659abda29b2b25db2771c3e6086f15bc74b1d06\ndangling commit 0f5aaf12d411debc2958dfb029ffcf873d980f15\ndangling commit 8eed8a5da8330df6901f254eab4b7056855b919c\n\nThe version of git on that box is 1.2.6-1 from Debian etch.\n\n\t\tDave\n\n-- \nhttp://www.codemonkey.org.uk\n"},{"id":"20350","messageId":"BAYC1-PASMTP12721518DAEC49D36EF4B8AEA40@CEZ.ICE","threadId":"4225","inReplyTo":"20060520230531.GA27511@redhat.com","subject":"Re: dangling commits.","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-05-20T23:08:02Z","receivedAt":"2006-05-20T23:08:02Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Sat, 20 May 2006 19:05:31 -0400\nDave Jones <davej@redhat.com> wrote:\n\n> What's wrong here?\n> \n> (tmp)$ mkdir git\n> (tmp)$ cd git\n> (git)$ rsync -azq rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/git.git/ .git\n> (git)$ git-fsck-objects --full\n> dangling commit fc024e5e1b92fb11d11aa3c15e9e3f92a888acb6\n> dangling commit be49def3dd524b241e3f14c657e740f2e4d73d39\n> dangling commit e659abda29b2b25db2771c3e6086f15bc74b1d06\n> dangling commit 0f5aaf12d411debc2958dfb029ffcf873d980f15\n> dangling commit 8eed8a5da8330df6901f254eab4b7056855b919c\n> \n> The version of git on that box is 1.2.6-1 from Debian etch.\n> \n> \t\tDave\n> \n\nNothing wrong.  Those commits were just dropped from the \"pu\" branch at\none time or another when it was rewound.  The repository could use a\npruning, but there's no harm done by having those objects remain in\nthe object database.   If you had used any protocol other than rsync,\nthey would not have appeared in your cloned copy.\n\nSean\n"},{"id":"20351","messageId":"Pine.LNX.4.64.0605201615270.3649@g5.osdl.org","threadId":"4225","inReplyTo":"20060520230531.GA27511@redhat.com","subject":"Re: dangling commits.","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-20T23:19:06Z","receivedAt":"2006-05-20T23:19:06Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 20 May 2006, Dave Jones wrote:\n>\n> What's wrong here?\n\nNothing, except\n\n - you used rsync to fetch the thing (so you get all objects, regardless \n   of whether they are reachable or not)\n\n - junio re-bases his \"pu\" branch, and I just end up following him (I \n   should stop exporting git entirely, here's no point, really). Thus, \n   whenever \"pu\" gets reset to something else, the old head of pu gets \n   dropped on the floor and ends up as a \"dangling\" commit (no branch head \n   points to it any more).\n\nThe moral(s) of the story being that\n\n (a) dangling commits are normal if you reset branch heads (which includes \n     things like \"git rebase\", for example)\n\n (b) rsync is not a good transfer protocol, since it will just blindly \n     transfer objects that aren't needed - or worse - successfully clone a \n     corrupt repository.\n\nbut there's nothing to _worry_ about in this particular schenario.\n\n\t\tLinus\n"},{"id":"20352","messageId":"20060520234911.GA30269@redhat.com","threadId":"4225","inReplyTo":"Pine.LNX.4.64.0605201615270.3649@g5.osdl.org","subject":"Re: dangling commits.","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2006-05-20T23:49:11Z","receivedAt":"2006-05-20T23:49:11Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"On Sat, May 20, 2006 at 04:19:06PM -0700, Linus Torvalds wrote:\n\n > > What's wrong here?\n > \n > Nothing, except\n > \n >  - you used rsync to fetch the thing (so you get all objects, regardless \n >    of whether they are reachable or not)\n\nAh. I actually noticed this when I poked around the box that does\nthe nightly snapshots, and wondered for a few minutes why I never\nswitched it over to git:// last time I poked at that script.\nThen it came back to me: rsync -q worked better than redirecting\ngit to /dev/null\n- git-clone's -q was still outputting some stuff, so recloning each\n  time the cronjob ran wasn't an option,\n- subsequent git pull's were noisy too\n\nWhen run from a cronjob, unless something fatal happens, I basically\nnever want to get mail from the snapshotting script.\n\n >  - junio re-bases his \"pu\" branch, and I just end up following him (I \n >    should stop exporting git entirely, here's no point, really).\n\nI just updated the snapshot script to pull from \nhttp://www.kernel.org/pub/scm/git/git.git/ instead.\n\nthanks,\n\n\t\tDave\n\n-- \nhttp://www.codemonkey.org.uk\n"}]}