{"thread":{"id":"17060","subject":"1.5.6.5 fails to clone git.kernel.org/[...]/rostedt/linux-2.6-rt","startedAt":"2009-01-09T06:24:19Z","lastAt":"2009-01-14T23:10:47Z","messageCount":5,"participants":["Tim Shepard","Junio C Hamano","Miklos Vajna","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"99762","messageId":"E1LLAn5-0001JM-00@alva.home","threadId":"17060","inReplyTo":null,"subject":"1.5.6.5 fails to clone git.kernel.org/[...]/rostedt/linux-2.6-rt","fromName":"Tim Shepard","fromEmail":"shep@alum.mit.edu","sentAt":"2009-01-09T06:24:19Z","receivedAt":"2009-01-09T06:24:19Z","isPatch":false,"sender":{"key":"shep@alum.mit.edu","avatar":null},"body":"\n\nI have git 1.5.6.5 installed from the Debian/lenny package.\n\nPoking around in http://git.kernel.org/ looking for a git repository\nthat might have the latest -rt development happening, I found\n\n  http://git.kernel.org/?p=linux/kernel/git/rostedt/linux-2.6-rt.git\n\nwhich looked promising.\n\nBut when I tried cloning it using:\n\n    git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-rt.git linux-2.6-rt\n\nit pulled several hundred megabytes through my (rather slow) DSL line\nand then printed out\n\n  error: Trying to write ref refs/tags/v2.6.11 with nonexistant object 5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c\n  fatal: Cannot update the ref 'refs/tags/v2.6.11'.\n\nand then removed everything it had just pulled.\n\n\nLooking at http://git.kernel.org/?p=linux/kernel/git/rostedt/linux-2.6-rt.git;a=tags\nI see that apparently v2.6.11 and v.2.6.11-tree both point at a tree\nobject and not a commit.\n\nIs this a bug in git?    (Even if there is something wrong with the\ngit repository I was trying to clone, the fact that it removed all the\nwork that took a long time to pull is annoying.)\n\nIs this problem already fixed in some newer version of git?\n\n\n\t\t\t-Tim Shepard\n\t\t\t shep@alum.mit.edu\n"},{"id":"99769","messageId":"7vpriw26uo.fsf@gitster.siamese.dyndns.org","threadId":"17060","inReplyTo":"E1LLAn5-0001JM-00@alva.home","subject":"Re: 1.5.6.5 fails to clone git.kernel.org/[...]/rostedt/linux-2.6-rt","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-09T08:58:55Z","receivedAt":"2009-01-09T08:58:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tim Shepard <shep@alum.mit.edu> writes:\n\n> I have git 1.5.6.5 installed from the Debian/lenny package.\n>\n> Poking around in http://git.kernel.org/ looking for a git repository\n> that might have the latest -rt development happening, I found\n>\n>   http://git.kernel.org/?p=linux/kernel/git/rostedt/linux-2.6-rt.git\n>\n> which looked promising.\n>\n> But when I tried cloning it using:\n>\n>     git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-rt.git linux-2.6-rt\n>\n> it pulled several hundred megabytes through my (rather slow) DSL line\n> and then printed out\n>\n>   error: Trying to write ref refs/tags/v2.6.11 with nonexistant object 5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c\n>   fatal: Cannot update the ref 'refs/tags/v2.6.11'.\n>\n> and then removed everything it had just pulled.\n>\n> Looking at http://git.kernel.org/?p=linux/kernel/git/rostedt/linux-2.6-rt.git;a=tags\n> I see that apparently v2.6.11 and v.2.6.11-tree both point at a tree\n> object and not a commit.\n>\n> Is this a bug in git?\n\nIt is not a problem for the tag pointing to a tree, but linux-2.6-rt.git\ntree uses (like everybody else) objects/alternates to borrow objects from\nthe repository of Linus.\n\nI think we lost the alternate object store support when git-fetch was\nrewritten from the original shell script (that did support fetching from\nsuch a repository over rsync:// transport) to a reimplementation in C,\nwith commit b888d61 (Make fetch a builtin, 2007-09-10).  \n\nLater, cd547b4 (fetch/push: readd rsync support, 2007-10-01) attempted to\nresurrect some rsync support (b888d61 lost rsync support completely for\ngit-fetch), but introduced these lines in transport.c:\n\n\t/* NEEDSWORK: handle one level of alternates */\n\tresult = run_command(&rsync);\n\nThese have not been touched ever since, and then finally commit 8434c2f\n(Build in clone, 2008-04-27) killed support of cloning from a repository\nthat uses alternates for rsync transport for git-clone (before that, the\nshell script version had a special case to still allow such operation over\nrsync).\n\nIt appears practically nobody uses rsync:// transport anymore these days;\nyou are unfortunately the first one who noticed it.\n"},{"id":"99792","messageId":"20090109140801.GO21154@genesis.frugalware.org","threadId":"17060","inReplyTo":"E1LLAn5-0001JM-00@alva.home","subject":"Re: 1.5.6.5 fails to clone git.kernel.org/[...]/rostedt/linux-2.6-rt","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2009-01-09T14:08:01Z","receivedAt":"2009-01-09T14:08:01Z","isPatch":false,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Fri, Jan 09, 2009 at 01:24:19AM -0500, Tim Shepard <shep@alum.mit.edu> wrote:\n> \n> \n> I have git 1.5.6.5 installed from the Debian/lenny package.\n> \n> Poking around in http://git.kernel.org/ looking for a git repository\n> that might have the latest -rt development happening, I found\n> \n>   http://git.kernel.org/?p=linux/kernel/git/rostedt/linux-2.6-rt.git\n> \n> which looked promising.\n> \n> But when I tried cloning it using:\n> \n>     git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-rt.git linux-2.6-rt\n\nI would use the git:// link from gitweb.\n"},{"id":"99819","messageId":"E1LLOaJ-0004ce-00@alva.home","threadId":"17060","inReplyTo":"7vpriw26uo.fsf@gitster.siamese.dyndns.org","subject":"Re: 1.5.6.5 fails to clone git.kernel.org/[...]/rostedt/linux-2.6-rt","fromName":"Tim Shepard","fromEmail":"shep@alum.mit.edu","sentAt":"2009-01-09T21:08:03Z","receivedAt":"2009-01-09T21:08:03Z","isPatch":false,"sender":{"key":"shep@alum.mit.edu","avatar":null},"body":"\n\nJunio,\n\nThank you for your good explanation.\n\nAlso thanks to Miklos Vajna who also replied to suggest using git:// transport.\n\n\n(Over 3 years ago I used git glone to get a copy of torvalds/linux-2.6.git\n using rsync transport and I copied the recipe I used then.  It has been\n working for \"git pull\" updates, and for one from-scratch re-clone\n I did sometime last year. I had no reason to suspect it was broken.)\n\nThis morning I re-started the clone using git:// transport and it worked OK.\n\n\n\t\t\t-Tim Shepard\n\t\t\t shep@alum.mit.edu\n"},{"id":"100506","messageId":"alpine.DEB.1.00.0901142357360.3586@pacific.mpi-cbg.de","threadId":"17060","inReplyTo":"7vpriw26uo.fsf@gitster.siamese.dyndns.org","subject":"Re: 1.5.6.5 fails to clone git.kernel.org/[...]/rostedt/linux-2.6-rt","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-14T23:10:47Z","receivedAt":"2009-01-14T23:10:47Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 9 Jan 2009, Junio C Hamano wrote:\n\n> I think we lost the alternate object store support when git-fetch was \n> rewritten from the original shell script (that did support fetching from \n> such a repository over rsync:// transport) to a reimplementation in C, \n> with commit b888d61 (Make fetch a builtin, 2007-09-10).\n> \n> Later, cd547b4 (fetch/push: readd rsync support, 2007-10-01) attempted to\n> resurrect some rsync support (b888d61 lost rsync support completely for\n> git-fetch), but introduced these lines in transport.c:\n> \n> \t/* NEEDSWORK: handle one level of alternates */\n> \tresult = run_command(&rsync);\n\nIndeed... And I know who's responsible for those lines.\n\nHowever, I am swamped with work these days, and my Git time budget was \n_way_ overspent what with the recent patches.\n\nSo whoever would like to give it a go, go wild.\n\nThis is actually a very fine opportunity for people to get involved who \nalways wanted to; it is a relatively low-hanging fruit.\n\nIt should just be a matter of getting objects/info/alternates (one can \neasily reuse a large part of the args[] array filled before the quoted \ncode) into a temporary file.\n\nIf that does not succeed, return 0, otherwise fetch those objects, too \n(again reusing most of the args[] array).\n\nIt is that easy because objects as well as packs are immutable, so we can \njust build the union of objects/packs from the remote and its alternate.\n\nThen all which is left to do is to add a test case to t/t5510-fetch.sh, \nand you're set.\n\nAs there are already test cases for rsync:// in it, it should be as simple \nas putting an empty file into a newly created directory, create an \nalternate for the \"remote\" pointing to the directory, fetching, and \ntesting that the empty file was copied.\n\nThat's possible because rsync:// is dumb and does not verify the files it \ncopied.\n\nOh, and don't forget to remove the NEEDSWORK comment :-)\n\nAnd now I'm curious who's up for it...\n\nCiao,\nDscho\n"}]}