{"thread":{"id":"26288","subject":"Re: cannot fetch arm git tree","startedAt":"2011-01-16T11:08:19Z","lastAt":"2011-01-24T10:53:28Z","messageCount":15,"participants":["Uwe Kleine-König","Russell King - ARM Linux","Detlef Vollmann","Jello huang","Miles Bader","Johannes Sixt","J.H."],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"159544","messageId":"20110116110819.GG6917@pengutronix.de","threadId":"26288","inReplyTo":"20110116092315.GA27542@n2100.arm.linux.org.uk","subject":"Re: cannot fetch arm git tree","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2011-01-16T11:08:19Z","receivedAt":"2011-01-16T11:08:19Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello Jello,\n\nOn Sun, Jan 16, 2011 at 09:23:15AM +0000, Russell King - ARM Linux wrote:\n> On Sun, Jan 16, 2011 at 10:28:55AM +0800, Jello huang wrote:\n> > Dear Russell,\n> > \n> > when i use git fetch,there arm some wrong with it.\n> > \n> > jello@jello-laptop:~/git/russell/linux-2.6-arm$git pull\n> > error: Unable to find 89e4d4b145bb7e73b4c45671a84b401a5d8694c1 under\n> > http://ftp.arm.linux.org.uk/pub/armlinux/kernel/git-cur/linux-2.6-arm.git\n> > Cannot obtain needed blob 89e4d4b145bb7e73b4c45671a84b401a5d8694c1\n> > while processing commit eda2e5dcc914b4d70f665443efc9780e89a5e5c1.\n> > error: Fetch failed.\n> > \n> > What is the wrong?\n> \n> No idea.  The tree has the object file in one of its pack files:\n> \n> | rmk@ZenIV:[linux-2.6-arm.git]:<1020> GIT_DIR=. git cat-file -p 89e4d4b145bb7e73b4c45671a84b401a5d8694c1|head\n> | \n> |         List of maintainers and how to submit kernel changes\n> | \n> | Please try to follow the guidelines below.  This will make things\n> | easier on the maintainers.  Not all of these guidelines matter for every\n> | trivial patch so apply some common sense.\n> \n> and the pack info file lists all the pack files.  Maybe you have a hash\n> collision on a pack file with your repository?\nProbably you have a corrupted pack file.  Try renaming all packfiles\nlisted in\nhttp://ftp.arm.linux.org.uk/pub/armlinux/kernel/git-cur/linux-2.6-arm.git/objects/info/packs\n(i.e.\n.git/objects/pack/pack-74405a23171b6debd894d4791e06956d6387022a.pack\netc.) and try refetching then.  This happend to me after Ctrl-Cing an\nearlier git-fetch.  Git doesn't seem to handle that case.\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                           | Uwe Kleine-König            |\nIndustrial Linux Solutions                 | http://www.pengutronix.de/  |\n"},{"id":"159549","messageId":"20110116134248.GD27542@n2100.arm.linux.org.uk","threadId":"26288","inReplyTo":"AANLkTinrZ0GnT71GCueUUpAXM5ckq+LBd0RjA51DMR-a@mail.gmail.com","subject":"Re: cannot fetch arm git tree","fromName":"Russell King - ARM Linux","fromEmail":"linux@arm.linux.org.uk","sentAt":"2011-01-16T13:42:48Z","receivedAt":"2011-01-16T13:42:48Z","isPatch":false,"sender":{"key":"linux@arm.linux.org.uk","avatar":null},"body":"On Sun, Jan 16, 2011 at 09:10:17PM +0800, Jello huang wrote:\n> yes,git doesn't  handle that case and i rename the pack name,but there is\n> also the similar error.Now i just delet the git tree and  clone it again\n> tonight .\n\n_Always_ without fail fetch Linus' tree before pulling my tree.\n\nMy tree is a rsync clone of the objects and pack files in Linus' tree,\nplus whatever git decided to build on top of that - for local commits\nthat's individual object files.  For remote pulls, that's probably a few\nsmall pack files.\n\nThere is *no* repacking of my tree.  So the only times it gets 'repacked'\nis when Linus repacks his tree.\n\nLet's say you already have a copy of my tree from a month ago, and Linus\nhas pulled some work from me into his tree, and repacked his tree into one\nsingle pack file.  At the moment, the largest pack file from Linus is\n400MB plus a 50MB index.\n\nYou already have most of the contents of that 400MB pack file, but if\nyou're missing even _one_ object which is contained within it, git will\nhave to download the _entire_ 400MB pack file and index file to retrieve\nit.\n\nHowever, if you first fetch Linus' tree via the git protocol, it can just\nrequest the objects it doesn't have from the git server.  That will mean\nyou'll have all the objects in the large pack files before you start trying\nto pull my tree, and git won't have to download 400MB for the sake of\nretrieving just maybe 10k that you didn't have.\n\nThis isn't something special with my tree - it's a side effect of the\nhttp protocol git uses.  So, before you fetch _any_ http-based git tree,\nfirst make sure you're up to date with Linus'.\n\n(I update my tree from Linus' in rsync mode to make http-based stuff a\nlot more friendly to people using it - some of whom are stuck behind\nfirewalls which can only do http.  Fetching a constantly repacked git\ntree via http results in hundreds of megabytes needing to be fetched\nevery time.)\n\nSo please, whenever possible, always fetch Linus' latest tree _first_\nand then mine.  Same goes for any other http based tree which doesn't\nauto-repack.\n"},{"id":"159791","messageId":"AANLkTi=VPj2JVnkjv-ja48OUwJZR3zhDYcvSeps1X8x1@mail.gmail.com","threadId":"26288","inReplyTo":"20110116134248.GD27542@n2100.arm.linux.org.uk","subject":"Re: cannot fetch arm git tree","fromName":"Jello huang","fromEmail":"ruifeihuang@gmail.com","sentAt":"2011-01-17T01:49:28Z","receivedAt":"2011-01-17T01:49:28Z","isPatch":false,"sender":{"key":"ruifeihuang@gmail.com","avatar":null},"body":"Russell,thanks for your reply so elaborate and i have gotten the idea now.\n\nOn 16 January 2011 21:42, Russell King - ARM Linux\n<linux@arm.linux.org.uk>wrote:\n\n> On Sun, Jan 16, 2011 at 09:10:17PM +0800, Jello huang wrote:\n> > yes,git doesn't  handle that case and i rename the pack name,but there is\n> > also the similar error.Now i just delet the git tree and  clone it again\n> > tonight .\n>\n> _Always_ without fail fetch Linus' tree before pulling my tree.\n>\n> My tree is a rsync clone of the objects and pack files in Linus' tree,\n> plus whatever git decided to build on top of that - for local commits\n> that's individual object files.  For remote pulls, that's probably a few\n> small pack files.\n>\n> There is *no* repacking of my tree.  So the only times it gets 'repacked'\n> is when Linus repacks his tree.\n>\n> Let's say you already have a copy of my tree from a month ago, and Linus\n> has pulled some work from me into his tree, and repacked his tree into one\n> single pack file.  At the moment, the largest pack file from Linus is\n> 400MB plus a 50MB index.\n>\n> You already have most of the contents of that 400MB pack file, but if\n> you're missing even _one_ object which is contained within it, git will\n> have to download the _entire_ 400MB pack file and index file to retrieve\n> it.\n>\n> However, if you first fetch Linus' tree via the git protocol, it can just\n> request the objects it doesn't have from the git server.  That will mean\n> you'll have all the objects in the large pack files before you start trying\n> to pull my tree, and git won't have to download 400MB for the sake of\n> retrieving just maybe 10k that you didn't have.\n>\n> This isn't something special with my tree - it's a side effect of the\n> http protocol git uses.  So, before you fetch _any_ http-based git tree,\n> first make sure you're up to date with Linus'.\n>\n> (I update my tree from Linus' in rsync mode to make http-based stuff a\n> lot more friendly to people using it - some of whom are stuck behind\n> firewalls which can only do http.  Fetching a constantly repacked git\n> tree via http results in hundreds of megabytes needing to be fetched\n> every time.)\n>\n> So please, whenever possible, always fetch Linus' latest tree _first_\n> and then mine.  Same goes for any other http based tree which doesn't\n> auto-repack.\n>\n\n\n\n-- \nJUST DO IT,NOTHING IS IMPOSSIBLE\n\n\n_______________________________________________\nlinux-arm-kernel mailing list\nlinux-arm-kernel@lists.infradead.org\nhttp://lists.infradead.org/mailman/listinfo/linux-arm-kernel\n"},{"id":"159745","messageId":"4D398C43.1000306@vollmann.ch","threadId":"26288","inReplyTo":"20110116134248.GD27542@n2100.arm.linux.org.uk","subject":"Re: cannot fetch arm git tree","fromName":"Detlef Vollmann","fromEmail":"dv@vollmann.ch","sentAt":"2011-01-21T13:38:11Z","receivedAt":"2011-01-21T13:38:11Z","isPatch":false,"sender":{"key":"dv@vollmann.ch","avatar":null},"body":"On 01/16/11 14:42, Russell King - ARM Linux wrote:\n> Let's say you already have a copy of my tree from a month ago, and Linus\n> has pulled some work from me into his tree, and repacked his tree into one\n> single pack file.  At the moment, the largest pack file from Linus is\n> 400MB plus a 50MB index.\n>\n> You already have most of the contents of that 400MB pack file, but if\n> you're missing even _one_ object which is contained within it, git will\n> have to download the _entire_ 400MB pack file and index file to retrieve\n> it.\nI thought this has changed with \"smart http\" in git 1.6.6.\nAm I missing something?\n\n   Detlef\n"},{"id":"159746","messageId":"20110121134728.GO14956@pengutronix.de","threadId":"26288","inReplyTo":"4D398C43.1000306@vollmann.ch","subject":"Re: cannot fetch arm git tree","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2011-01-21T13:47:28Z","receivedAt":"2011-01-21T13:47:28Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hi Detlef,\n\nOn Fri, Jan 21, 2011 at 02:38:11PM +0100, Detlef Vollmann wrote:\n> On 01/16/11 14:42, Russell King - ARM Linux wrote:\n> >Let's say you already have a copy of my tree from a month ago, and Linus\n> >has pulled some work from me into his tree, and repacked his tree into one\n> >single pack file.  At the moment, the largest pack file from Linus is\n> >400MB plus a 50MB index.\n> >\n> >You already have most of the contents of that 400MB pack file, but if\n> >you're missing even _one_ object which is contained within it, git will\n> >have to download the _entire_ 400MB pack file and index file to retrieve\n> >it.\n> I thought this has changed with \"smart http\" in git 1.6.6.\n> Am I missing something?\nWell, not all http repos offer smart http.  E.g. Russell doesn't[1],\nprobably because the serving machine doesn't have the power to nice\nserve a repo via git:// or smart http://.\n\nBest regards\nUwe\n\n[1] I didn't recheck though\n\n-- \nPengutronix e.K.                           | Uwe Kleine-König            |\nIndustrial Linux Solutions                 | http://www.pengutronix.de/  |\n"},{"id":"159747","messageId":"20110121135725.GR13235@n2100.arm.linux.org.uk","threadId":"26288","inReplyTo":"20110121134728.GO14956@pengutronix.de","subject":"Re: cannot fetch arm git tree","fromName":"Russell King - ARM Linux","fromEmail":"linux@arm.linux.org.uk","sentAt":"2011-01-21T13:57:25Z","receivedAt":"2011-01-21T13:57:25Z","isPatch":false,"sender":{"key":"linux@arm.linux.org.uk","avatar":null},"body":"On Fri, Jan 21, 2011 at 02:47:28PM +0100, Uwe Kleine-König wrote:\n> Hi Detlef,\n> \n> On Fri, Jan 21, 2011 at 02:38:11PM +0100, Detlef Vollmann wrote:\n> > On 01/16/11 14:42, Russell King - ARM Linux wrote:\n> > >Let's say you already have a copy of my tree from a month ago, and Linus\n> > >has pulled some work from me into his tree, and repacked his tree into one\n> > >single pack file.  At the moment, the largest pack file from Linus is\n> > >400MB plus a 50MB index.\n> > >\n> > >You already have most of the contents of that 400MB pack file, but if\n> > >you're missing even _one_ object which is contained within it, git will\n> > >have to download the _entire_ 400MB pack file and index file to retrieve\n> > >it.\n> > I thought this has changed with \"smart http\" in git 1.6.6.\n> > Am I missing something?\n> Well, not all http repos offer smart http.  E.g. Russell doesn't[1],\n> probably because the serving machine doesn't have the power to nice\n> serve a repo via git:// or smart http://.\n\nWhat is smart http?  I don't particularly follow git developments.\n"},{"id":"159748","messageId":"4D3997FE.5030109@vollmann.ch","threadId":"26288","inReplyTo":"20110121135725.GR13235@n2100.arm.linux.org.uk","subject":"Re: cannot fetch arm git tree","fromName":"Detlef Vollmann","fromEmail":"dv@vollmann.ch","sentAt":"2011-01-21T14:28:14Z","receivedAt":"2011-01-21T14:28:14Z","isPatch":false,"sender":{"key":"dv@vollmann.ch","avatar":null},"body":"On 01/21/11 14:57, Russell King - ARM Linux wrote:\n> On Fri, Jan 21, 2011 at 02:47:28PM +0100, Uwe Kleine-König wrote:\n>> Hi Detlef,\n>>\n>> On Fri, Jan 21, 2011 at 02:38:11PM +0100, Detlef Vollmann wrote:\n>>> On 01/16/11 14:42, Russell King - ARM Linux wrote:\n>>>> Let's say you already have a copy of my tree from a month ago, and Linus\n>>>> has pulled some work from me into his tree, and repacked his tree into one\n>>>> single pack file.  At the moment, the largest pack file from Linus is\n>>>> 400MB plus a 50MB index.\n>>>>\n>>>> You already have most of the contents of that 400MB pack file, but if\n>>>> you're missing even _one_ object which is contained within it, git will\n>>>> have to download the _entire_ 400MB pack file and index file to retrieve\n>>>> it.\n>>> I thought this has changed with \"smart http\" in git 1.6.6.\n>>> Am I missing something?\n>> Well, not all http repos offer smart http.  E.g. Russell doesn't[1],\n>> probably because the serving machine doesn't have the power to nice\n>> serve a repo via git:// or smart http://.\n>\n> What is smart http?  I don't particularly follow git developments.\nIt seems to be an implementation of the git protocol using\nHTTP as transport.\nSome info on this is at <http://progit.org/2010/03/04/smart-http.html>.\n\n   Detlef\n"},{"id":"159792","messageId":"AANLkTi=wHO4TrVe_x05+gCrfz0rsLcSLyJ5b8pT6c6-O@mail.gmail.com","threadId":"26288","inReplyTo":"4D3997FE.5030109@vollmann.ch","subject":"Re: cannot fetch arm git tree","fromName":"Jello huang","fromEmail":"ruifeihuang@gmail.com","sentAt":"2011-01-21T14:30:38Z","receivedAt":"2011-01-21T14:30:38Z","isPatch":false,"sender":{"key":"ruifeihuang@gmail.com","avatar":null},"body":"not a lucky dog. i used 1.6.0,there was a large pack.\n\nOn 21 January 2011 22:28, Detlef Vollmann <dv@vollmann.ch> wrote:\n\n> On 01/21/11 14:57, Russell King - ARM Linux wrote:\n>\n>> On Fri, Jan 21, 2011 at 02:47:28PM +0100, Uwe Kleine-König wrote:\n>>\n>>> Hi Detlef,\n>>>\n>>> On Fri, Jan 21, 2011 at 02:38:11PM +0100, Detlef Vollmann wrote:\n>>>\n>>>> On 01/16/11 14:42, Russell King - ARM Linux wrote:\n>>>>\n>>>>> Let's say you already have a copy of my tree from a month ago, and\n>>>>> Linus\n>>>>> has pulled some work from me into his tree, and repacked his tree into\n>>>>> one\n>>>>> single pack file.  At the moment, the largest pack file from Linus is\n>>>>> 400MB plus a 50MB index.\n>>>>>\n>>>>> You already have most of the contents of that 400MB pack file, but if\n>>>>> you're missing even _one_ object which is contained within it, git will\n>>>>> have to download the _entire_ 400MB pack file and index file to\n>>>>> retrieve\n>>>>> it.\n>>>>>\n>>>> I thought this has changed with \"smart http\" in git 1.6.6.\n>>>> Am I missing something?\n>>>>\n>>> Well, not all http repos offer smart http.  E.g. Russell doesn't[1],\n>>> probably because the serving machine doesn't have the power to nice\n>>> serve a repo via git:// or smart http://.\n>>>\n>>\n>> What is smart http?  I don't particularly follow git developments.\n>>\n> It seems to be an implementation of the git protocol using\n> HTTP as transport.\n> Some info on this is at <http://progit.org/2010/03/04/smart-http.html>.\n>\n>  Detlef\n>\n>\n\n\n-- \nJUST DO IT,NOTHING IS IMPOSSIBLE\n\n\n_______________________________________________\nlinux-arm-kernel mailing list\nlinux-arm-kernel@lists.infradead.org\nhttp://lists.infradead.org/mailman/listinfo/linux-arm-kernel\n"},{"id":"159750","messageId":"20110121145025.GS13235@n2100.arm.linux.org.uk","threadId":"26288","inReplyTo":"4D3997FE.5030109@vollmann.ch","subject":"Re: cannot fetch arm git tree","fromName":"Russell King - ARM Linux","fromEmail":"linux@arm.linux.org.uk","sentAt":"2011-01-21T14:50:26Z","receivedAt":"2011-01-21T14:50:26Z","isPatch":false,"sender":{"key":"linux@arm.linux.org.uk","avatar":null},"body":"On Fri, Jan 21, 2011 at 03:28:14PM +0100, Detlef Vollmann wrote:\n> It seems to be an implementation of the git protocol using\n> HTTP as transport.\n> Some info on this is at <http://progit.org/2010/03/04/smart-http.html>.\n\nSetting up Smart HTTP\n\n...\n   To set it up, it■s best to walk through the instructions on the\n   `git-http-backend` documentation page. Basically, you have to install Git\n   v1.6.6 or higher on a server with an Apache 2.x webserver (it has to be\n   Apache, currently - other CGI servers don■t work, last I checked). Then\n   you add something similar to this to your http.conf file:\n\n SetEnv GIT_PROJECT_ROOT /var/www/git\n SetEnv GIT_HTTP_EXPORT_ALL\n ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/\n\nGreat.  Deciding that it will be http://servername.example.com/git/ is\nreally damned annoying as that's traditionally where gitweb lives,\nwhich requires a different script alias.\n\nIt seems that due to a lack of coordination between different git\ndevelopers, people running webservers have a choice between providing\ngitweb or this http extension.\n\nI'm really not interested in working out how to bodge this into working\nalong side the existing gitweb setup by adding lots of rewrite rules, so\nas gitweb got there first I think it has priority, that's what we have\nand we'll have to live without the smart http extensions.\n\nIt's really not that big a deal if you follow the advice I've given.\n"},{"id":"159752","messageId":"4D39A2CA.5030504@vollmann.ch","threadId":"26288","inReplyTo":"20110121145025.GS13235@n2100.arm.linux.org.uk","subject":"Re: cannot fetch arm git tree","fromName":"Detlef Vollmann","fromEmail":"dv@vollmann.ch","sentAt":"2011-01-21T15:14:18Z","receivedAt":"2011-01-21T15:14:18Z","isPatch":false,"sender":{"key":"dv@vollmann.ch","avatar":null},"body":"On 01/21/11 15:50, Russell King - ARM Linux wrote:\n> On Fri, Jan 21, 2011 at 03:28:14PM +0100, Detlef Vollmann wrote:\n>> It seems to be an implementation of the git protocol using\n>> HTTP as transport.\n>> Some info on this is at<http://progit.org/2010/03/04/smart-http.html>.\n>\n> Setting up Smart HTTP\n>\n> ...\n>     To set it up, it■s best to walk through the instructions on the\n>     `git-http-backend` documentation page. Basically, you have to install Git\n>     v1.6.6 or higher on a server with an Apache 2.x webserver (it has to be\n>     Apache, currently - other CGI servers don■t work, last I checked). Then\n>     you add something similar to this to your http.conf file:\n>\n>   SetEnv GIT_PROJECT_ROOT /var/www/git\n>   SetEnv GIT_HTTP_EXPORT_ALL\n>   ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/\n>\n> Great.  Deciding that it will be http://servername.example.com/git/ is\n> really damned annoying as that's traditionally where gitweb lives,\n> which requires a different script alias.\n>\n> It seems that due to a lack of coordination between different git\n> developers, people running webservers have a choice between providing\n> gitweb or this http extension.\nHuh?\n/git/ is just the example here, you can use any name you want.\nE.g. I use /auth/ for authenticated users, and others use /gitmob/\nor /gitanon/ for non-authenticated users.\nAnd you can use something like gitsmart, githttp, or whatever...\n\n   Detlef\n\n\n_______________________________________________\nlinux-arm-kernel mailing list\nlinux-arm-kernel@lists.infradead.org\nhttp://lists.infradead.org/mailman/listinfo/linux-arm-kernel\n"},{"id":"159753","messageId":"20110121152544.GQ14956@pengutronix.de","threadId":"26288","inReplyTo":"20110121145025.GS13235@n2100.arm.linux.org.uk","subject":"Re: cannot fetch arm git tree","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2011-01-21T15:25:44Z","receivedAt":"2011-01-21T15:25:44Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"On Fri, Jan 21, 2011 at 02:50:26PM +0000, Russell King - ARM Linux wrote:\n> On Fri, Jan 21, 2011 at 03:28:14PM +0100, Detlef Vollmann wrote:\n> > It seems to be an implementation of the git protocol using\n> > HTTP as transport.\n> > Some info on this is at <http://progit.org/2010/03/04/smart-http.html>.\n> \n> Setting up Smart HTTP\n> \n> ...\n>    To set it up, it■s best to walk through the instructions on the\n>    `git-http-backend` documentation page. Basically, you have to install Git\n>    v1.6.6 or higher on a server with an Apache 2.x webserver (it has to be\n>    Apache, currently - other CGI servers don■t work, last I checked). Then\n>    you add something similar to this to your http.conf file:\n> \n>  SetEnv GIT_PROJECT_ROOT /var/www/git\n>  SetEnv GIT_HTTP_EXPORT_ALL\n>  ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/\n> \n> Great.  Deciding that it will be http://servername.example.com/git/ is\n> really damned annoying as that's traditionally where gitweb lives,\n> which requires a different script alias.\n> \n> It seems that due to a lack of coordination between different git\n> developers, people running webservers have a choice between providing\n> gitweb or this http extension.\n> \n> I'm really not interested in working out how to bodge this into working\n> along side the existing gitweb setup by adding lots of rewrite rules, so\n> as gitweb got there first I think it has priority, that's what we have\n> and we'll have to live without the smart http extensions.\nIIRC it's designed to live along side the http:// clone url.\ngit-http-backend can still serve dumb http clients including a web\nbrowser.\n \nBut note that as git-http-backend less info it has to calculate much\nmore.  So the load it introduces should be comparable to running\ngit-daemon as should be the times to fetch from it.  So AFAIK the only\nreason to run it is that more corporate users can access port 80.\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                           | Uwe Kleine-König            |\nIndustrial Linux Solutions                 | http://www.pengutronix.de/  |\n"},{"id":"159809","messageId":"buok4huzyh4.fsf@dhlpc061.dev.necel.com","threadId":"26288","inReplyTo":"20110121145025.GS13235@n2100.arm.linux.org.uk","subject":"Re: cannot fetch arm git tree","fromName":"Miles Bader","fromEmail":"miles@gnu.org","sentAt":"2011-01-24T05:01:43Z","receivedAt":"2011-01-24T05:01:43Z","isPatch":false,"sender":{"key":"miles@gnu.org","avatar":"https://gravatar.com/avatar/01069b69593af7bff28e2f97afeb3644ae6fe2f5f56cb3a8cf34c5fb8c36efe5?d=mp&s=160"},"body":"Russell King - ARM Linux <linux@arm.linux.org.uk> writes:\n> I'm really not interested in working out how to bodge this into working\n> along side the existing gitweb setup by adding lots of rewrite rules, so\n> as gitweb got there first I think it has priority, that's what we have\n> and we'll have to live without the smart http extensions.\n...\n> It's really not that big a deal if you follow the advice I've given.\n\nSmart http is actually a very big deal -- the old git http protocol is\nalmost unusable in practice with big repos, at least over somewhat\nlatency-limited network connections.\n\nIf you don't intend to support people pulling over http, then maybe you\ndon't care.  But if you do care, it's very much worth a second look.\n\n[My personal reason for caring is that I'm behind a corporate firewall\nthat's latency limited, although it seems to have pretty good bandwidth.\nWith some public repos, pulling via the old http protocol was a\nmulti-hour operation; the new http protocol is typically multiple orders\nof magnitude faster in these cases.]\n\n-Miles\n\n-- \nOmochiroi!\n"},{"id":"159810","messageId":"4D3D2865.4020408@viscovery.net","threadId":"26288","inReplyTo":"20110121145025.GS13235@n2100.arm.linux.org.uk","subject":"Re: cannot fetch arm git tree","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2011-01-24T07:21:09Z","receivedAt":"2011-01-24T07:21:09Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 1/21/2011 15:50, schrieb Russell King - ARM Linux:\n>  SetEnv GIT_PROJECT_ROOT /var/www/git\n>  SetEnv GIT_HTTP_EXPORT_ALL\n>  ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/\n> \n> Great.  Deciding that it will be http://servername.example.com/git/ is\n> really damned annoying as that's traditionally where gitweb lives,\n> which requires a different script alias.\n> ...\n> I'm really not interested in working out how to bodge this into working\n> along side the existing gitweb setup by adding lots of rewrite rules,...\n\nIt has been worked out for you already. It's just a single rule (although\na bit longish). Look for 'ScriptAliasMatch' in\nhttp://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html\n\n-- Hannes\n"},{"id":"159811","messageId":"4D3D2B84.6090409@eaglescrag.net","threadId":"26288","inReplyTo":"4D3D2865.4020408@viscovery.net","subject":"Re: cannot fetch arm git tree","fromName":"J.H.","fromEmail":"warthog19@eaglescrag.net","sentAt":"2011-01-24T07:34:28Z","receivedAt":"2011-01-24T07:34:28Z","isPatch":false,"sender":{"key":"warthog19@eaglescrag.net","avatar":null},"body":"On 01/23/2011 11:21 PM, Johannes Sixt wrote:\n> Am 1/21/2011 15:50, schrieb Russell King - ARM Linux:\n>>  SetEnv GIT_PROJECT_ROOT /var/www/git\n>>  SetEnv GIT_HTTP_EXPORT_ALL\n>>  ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/\n>>\n>> Great.  Deciding that it will be http://servername.example.com/git/ is\n>> really damned annoying as that's traditionally where gitweb lives,\n>> which requires a different script alias.\n>> ...\n>> I'm really not interested in working out how to bodge this into working\n>> along side the existing gitweb setup by adding lots of rewrite rules,...\n> \n> It has been worked out for you already. It's just a single rule (although\n> a bit longish). Look for 'ScriptAliasMatch' in\n> http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html\n\nI was going to say, I have both gitweb and smart http support running in\nparallel, it's not terribly complicated.  The way I'm doing it is a bit\nolder (mainly that long ScriptAliasMatch broken out more), but it's\nstill only 11 lines to the apache config:\n\n# Various environment setup, should be obvious\nSetEnv GIT_PROJECT_ROOT /path\nSetEnv GIT_HTTP_EXPORT_ALL 1\nSetEnv GIT_EXEC_PATH /usr/libexec/git-core/\n\n# Here so that we can do straight wget fetches for the objects files,\n# pack files and refs heads.\n# This isn't strictly neccisary, but if it's done we can use the inbuilt\n# sendfile() of apache for the sending of those files vs. funneling them\n# through the CGI\nAliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$\t\t/path/$1\nAliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$\t/path/$1\nAliasMatch ^/(.*/refs/heads/.*)$\t\t\t\t/path/$1\n\n# Meat of how to make this all work\nScriptAliasMatch \"^/(.*/HEAD)$\"\n/usr/libexec/git-core/git-http-backend/path/$1\nScriptAliasMatch \"^/(.*/info/refs)$\"\n/usr/libexec/git-core/git-http-backend/path/$1\nScriptAliasMatch \"^/(.*/objects/info/[^/]+)$\"\n/usr/libexec/git-core/git-http-backend/path/$1\nScriptAliasMatch \"^/pub/scm/(.*/git-upload-pack)$\"\n/usr/libexec/git-core/git-http-backend/path/$1\nScriptAliasMatch \"^/pub/scm/(.*/git-receive-pack)$\"\n/usr/libexec/git-core/git-http-backend/path/$1\n\nJust an example anyway, the paths have been shortened to fit e-mail better.\n\n- John 'Warthog9' Hawley\n"},{"id":"159819","messageId":"20110124105328.GG16202@n2100.arm.linux.org.uk","threadId":"26288","inReplyTo":"4D3D2865.4020408@viscovery.net","subject":"Re: cannot fetch arm git tree","fromName":"Russell King - ARM Linux","fromEmail":"linux@arm.linux.org.uk","sentAt":"2011-01-24T10:53:28Z","receivedAt":"2011-01-24T10:53:28Z","isPatch":false,"sender":{"key":"linux@arm.linux.org.uk","avatar":null},"body":"On Mon, Jan 24, 2011 at 08:21:09AM +0100, Johannes Sixt wrote:\n> Am 1/21/2011 15:50, schrieb Russell King - ARM Linux:\n> >  SetEnv GIT_PROJECT_ROOT /var/www/git\n> >  SetEnv GIT_HTTP_EXPORT_ALL\n> >  ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/\n> > \n> > Great.  Deciding that it will be http://servername.example.com/git/ is\n> > really damned annoying as that's traditionally where gitweb lives,\n> > which requires a different script alias.\n> > ...\n> > I'm really not interested in working out how to bodge this into working\n> > along side the existing gitweb setup by adding lots of rewrite rules,...\n> \n> It has been worked out for you already. It's just a single rule (although\n> a bit longish). Look for 'ScriptAliasMatch' in\n> http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html\n\nThanks, added taking two server restarts (one of them took a few minutes\nfor apache to restart as it was soo busy...)\n\nI assume this also means that I need to update the URLs people are using\n(as the tree wasn't exported under http://hostname.example.com/git/)?\n"}]}