{"thread":{"id":"14760","subject":"Gitweb: Provide Git links in project list?","startedAt":"2008-07-30T12:57:43Z","lastAt":"2008-08-04T20:10:20Z","messageCount":14,"participants":["Robert Richter","Fredrik Skolmli","Bert Wesarg","J.H.","Boyd Lynn Gerber","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"85611","messageId":"20080730125743.GY15356@erda.amd.com","threadId":"14760","inReplyTo":null,"subject":"Gitweb: Provide Git links in project list?","fromName":"Robert Richter","fromEmail":"robert.richter@amd.com","sentAt":"2008-07-30T12:57:43Z","receivedAt":"2008-07-30T12:57:43Z","isPatch":false,"sender":{"key":"robert.richter@amd.com","avatar":null},"body":"The Gitweb on git.kernel.org povides links to the Git repository for\neach project (git <git://...>). However, I did not find this feature\nin the current implementation of git_project_list_body(). Does\nsomebody know if there is a patch available for this and if this could\nbe added to gitweb?\n\nThanks,\n\n-Robert\n\n-- \nAdvanced Micro Devices, Inc.\nOperating System Research Center\nemail: robert.richter@amd.com\n"},{"id":"85618","messageId":"20080730130257.GB28566@frsk.net","threadId":"14760","inReplyTo":"20080730125743.GY15356@erda.amd.com","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"Fredrik Skolmli","fromEmail":"fredrik@frsk.net","sentAt":"2008-07-30T13:02:57Z","receivedAt":"2008-07-30T13:02:57Z","isPatch":false,"sender":{"key":"fredrik@frsk.net","avatar":"https://avatars.githubusercontent.com/u/40261?v=4"},"body":"On Wed, Jul 30, 2008 at 02:57:43PM +0200, Robert Richter wrote:\n\n> The Gitweb on git.kernel.org povides links to the Git repository for\n> each project (git <git://...>). However, I did not find this feature\n> in the current implementation of git_project_list_body(). Does\n> somebody know if there is a patch available for this and if this could\n> be added to gitweb?\n\nIs putting the address in .git/cloneurl giving the behaviour you're looking for?\n\n- F\n\n-- \nRegards,\nFredrik Skolmli\n"},{"id":"85612","messageId":"20080730131357.GZ15356@erda.amd.com","threadId":"14760","inReplyTo":"20080730130257.GB28566@frsk.net","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"Robert Richter","fromEmail":"robert.richter@amd.com","sentAt":"2008-07-30T13:13:57Z","receivedAt":"2008-07-30T13:13:57Z","isPatch":false,"sender":{"key":"robert.richter@amd.com","avatar":null},"body":"On 30.07.08 15:02:57, Fredrik Skolmli wrote:\n> On Wed, Jul 30, 2008 at 02:57:43PM +0200, Robert Richter wrote:\n> \n> > The Gitweb on git.kernel.org povides links to the Git repository for\n> > each project (git <git://...>). However, I did not find this feature\n> > in the current implementation of git_project_list_body(). Does\n> > somebody know if there is a patch available for this and if this could\n> > be added to gitweb?\n> \n> Is putting the address in .git/cloneurl giving the behaviour you're looking for?\n\nYes, I did change this and in the project summary I get \"URL git://...\".\n\nThat I mean is the main page, that lists the projects. I only have:\n\n... summary | shortlog | log | tree\n\nAt git.kernel.org there is additional '... | git' with a link to the\nGit repository.\n\nThe current source of gitweb seems not to provide this.\n\n-Robert\n\n-- \nAdvanced Micro Devices, Inc.\nOperating System Research Center\nemail: robert.richter@amd.com\n"},{"id":"85615","messageId":"20080730132935.GC28566@frsk.net","threadId":"14760","inReplyTo":"20080730131357.GZ15356@erda.amd.com","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"Fredrik Skolmli","fromEmail":"fredrik@frsk.net","sentAt":"2008-07-30T13:29:35Z","receivedAt":"2008-07-30T13:29:35Z","isPatch":false,"sender":{"key":"fredrik@frsk.net","avatar":"https://avatars.githubusercontent.com/u/40261?v=4"},"body":"On Wed, Jul 30, 2008 at 03:13:57PM +0200, Robert Richter wrote:\n\n> At git.kernel.org there is additional '... | git' with a link to the\n> Git repository.\n \nAh, sorry. I had a look before sending the mail, but apparently missed that\nlittle detail.\n\n-- \nRegards,\nFredrik Skolmli\n"},{"id":"85631","messageId":"36ca99e90807300755r1b1bc53bmdbaa1811370cd1f@mail.gmail.com","threadId":"14760","inReplyTo":"20080730131357.GZ15356@erda.amd.com","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2008-07-30T14:55:40Z","receivedAt":"2008-07-30T14:55:40Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Wed, Jul 30, 2008 at 15:13, Robert Richter <robert.richter@amd.com> wrote:\n> On 30.07.08 15:02:57, Fredrik Skolmli wrote:\n>> On Wed, Jul 30, 2008 at 02:57:43PM +0200, Robert Richter wrote:\n>>\n>> > The Gitweb on git.kernel.org povides links to the Git repository for\n>> > each project (git <git://...>). However, I did not find this feature\n>> > in the current implementation of git_project_list_body(). Does\n>> > somebody know if there is a patch available for this and if this could\n>> > be added to gitweb?\n>>\n>> Is putting the address in .git/cloneurl giving the behaviour you're looking for?\n>\n> Yes, I did change this and in the project summary I get \"URL git://...\".\n>\n> That I mean is the main page, that lists the projects. I only have:\n>\n> ... summary | shortlog | log | tree\n>\n> At git.kernel.org there is additional '... | git' with a link to the\n> Git repository.\n>\n> The current source of gitweb seems not to provide this.\n\nLook here for all notible forks of gitweb:\n\n  http://git.or.cz/gitwiki/Gitweb\n\nBert\n>\n> -Robert\n>\n> --\n> Advanced Micro Devices, Inc.\n> Operating System Research Center\n> email: robert.richter@amd.com\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"},{"id":"85637","messageId":"20080730152700.GD31295@erda.amd.com","threadId":"14760","inReplyTo":"36ca99e90807300755r1b1bc53bmdbaa1811370cd1f@mail.gmail.com","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"Robert Richter","fromEmail":"robert.richter@amd.com","sentAt":"2008-07-30T15:27:00Z","receivedAt":"2008-07-30T15:27:00Z","isPatch":false,"sender":{"key":"robert.richter@amd.com","avatar":null},"body":"On 30.07.08 16:55:40, Bert Wesarg wrote:\n> > The current source of gitweb seems not to provide this.\n> \n> Look here for all notible forks of gitweb:\n> \n>   http://git.or.cz/gitwiki/Gitweb\n> \n> Bert\n\nThanks Bert, it is in the kernel.org repository.\n\n-Robert\n\n-- \nAdvanced Micro Devices, Inc.\nOperating System Research Center\nemail: robert.richter@amd.com\n"},{"id":"85642","messageId":"1217432970.2884.8.camel@localhost.localdomain","threadId":"14760","inReplyTo":"20080730125743.GY15356@erda.amd.com","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"J.H.","fromEmail":"warthog19@eaglescrag.net","sentAt":"2008-07-30T15:49:30Z","receivedAt":"2008-07-30T15:49:30Z","isPatch":false,"sender":{"key":"warthog19@eaglescrag.net","avatar":null},"body":"Robert,\n\nThat is a kernel.org specific change - if the community at large wants\nit I can dig the patch out (I likely didn't do it as it's own patch when\nI did it, being young, naive and stupid at the time - I'm now slightly\nolder and slightly less naive now ;-)\n\nBut yeah - if people feel that's interesting I'm happy to rip it out\nlater today and submit it to the mailing list.\n\n- John 'Warthog9' Hawley\n\nOn Wed, 2008-07-30 at 14:57 +0200, Robert Richter wrote:\n> The Gitweb on git.kernel.org povides links to the Git repository for\n> each project (git <git://...>). However, I did not find this feature\n> in the current implementation of git_project_list_body(). Does\n> somebody know if there is a patch available for this and if this could\n> be added to gitweb?\n> \n> Thanks,\n> \n> -Robert\n> \n"},{"id":"85646","messageId":"20080730161126.GE31295@erda.amd.com","threadId":"14760","inReplyTo":"1217432970.2884.8.camel@localhost.localdomain","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"Robert Richter","fromEmail":"robert.richter@amd.com","sentAt":"2008-07-30T16:11:27Z","receivedAt":"2008-07-30T16:11:27Z","isPatch":false,"sender":{"key":"robert.richter@amd.com","avatar":null},"body":"On 30.07.08 08:49:30, J.H. wrote:\n> That is a kernel.org specific change - if the community at large wants\n> it I can dig the patch out (I likely didn't do it as it's own patch when\n> I did it, being young, naive and stupid at the time - I'm now slightly\n> older and slightly less naive now ;-)\n> \n> But yeah - if people feel that's interesting I'm happy to rip it out\n> later today and submit it to the mailing list.\n\nJohn, I would like the patch.\n\nYes, I have seen the commit as well and it is not the only change in\nthis commit. Also, if I got it right, the repository is not taken from\n.git/cloneurl. So, with the current implementation the git url in the\nsummary page may be different to cloneurl. But this is not a major\nissue.\n\nIt would be great if you could provide a patch with your changes for\ngitweb.\n\nThanks,\n\n-Robert\n\n-- \nAdvanced Micro Devices, Inc.\nOperating System Research Center\nemail: robert.richter@amd.com\n"},{"id":"85651","messageId":"alpine.LNX.1.10.0807301040360.6242@xenau.zenez.com","threadId":"14760","inReplyTo":"1217432970.2884.8.camel@localhost.localdomain","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"Boyd Lynn Gerber","fromEmail":"gerberb@zenez.com","sentAt":"2008-07-30T16:41:15Z","receivedAt":"2008-07-30T16:41:15Z","isPatch":false,"sender":{"key":"gerberb@zenez.com","avatar":null},"body":"On Wed, 30 Jul 2008, J.H. wrote:\n> That is a kernel.org specific change - if the community at large wants\n> it I can dig the patch out (I likely didn't do it as it's own patch when\n> I did it, being young, naive and stupid at the time - I'm now slightly\n> older and slightly less naive now ;-)\n> \n> But yeah - if people feel that's interesting I'm happy to rip it out\n> later today and submit it to the mailing list.\n\nI would like to see the patch.  I think it would be good to get it \nincluded.\n\nThanks,\n\n--\nBoyd Gerber <gerberb@zenez.com>\nZENEZ\t1042 East Fort Union #135, Midvale Utah  84047\n"},{"id":"86104","messageId":"1217796793.32240.36.camel@localhost.localdomain","threadId":"14760","inReplyTo":"20080730161126.GE31295@erda.amd.com","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"J.H.","fromEmail":"warthog19@eaglescrag.net","sentAt":"2008-08-03T20:53:13Z","receivedAt":"2008-08-03T20:53:13Z","isPatch":false,"sender":{"key":"warthog19@eaglescrag.net","avatar":null},"body":"Working on refactoring the patch so that it can go upstream, one of the\nthings I'm definitely making an assumption about (in my original code)\nis that the base url will be uniform for the entire project_list (as it\nis on kernel.org).  If that's acceptable I will probably be able to\nsubmit something today, if not I will need to muck about and read out\nthe url from .git/cloneurl (which would be a rather hefty performance\nhit - needing to read that from each repository)\n\n- John\n\nOn Wed, 2008-07-30 at 18:11 +0200, Robert Richter wrote:\n> On 30.07.08 08:49:30, J.H. wrote:\n> > That is a kernel.org specific change - if the community at large wants\n> > it I can dig the patch out (I likely didn't do it as it's own patch when\n> > I did it, being young, naive and stupid at the time - I'm now slightly\n> > older and slightly less naive now ;-)\n> > \n> > But yeah - if people feel that's interesting I'm happy to rip it out\n> > later today and submit it to the mailing list.\n> \n> John, I would like the patch.\n> \n> Yes, I have seen the commit as well and it is not the only change in\n> this commit. Also, if I got it right, the repository is not taken from\n> .git/cloneurl. So, with the current implementation the git url in the\n> summary page may be different to cloneurl. But this is not a major\n> issue.\n> \n> It would be great if you could provide a patch with your changes for\n> gitweb.\n> \n> Thanks,\n> \n> -Robert\n> \n"},{"id":"86169","messageId":"1217844410-24079-1-git-send-email-robert.richter@amd.com","threadId":"14760","inReplyTo":"1217796793.32240.36.camel@localhost.localdomain","subject":"[PATCH] Gitweb: Provide Git links in project list","fromName":"Robert Richter","fromEmail":"robert.richter@amd.com","sentAt":"2008-08-04T10:06:50Z","receivedAt":"2008-08-04T10:06:50Z","isPatch":true,"sender":{"key":"robert.richter@amd.com","avatar":null},"body":"Signed-off-by: Robert Richter <robert.richter@amd.com>\n---\n gitweb/gitweb.perl |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 90cd99b..6d9b7aa 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -3558,6 +3558,9 @@ sub fill_project_list_info {\n \t\tif (!defined $pr->{'owner'}) {\n \t\t\t$pr->{'owner'} = git_get_project_owner(\"$pr->{'path'}\") || \"\";\n \t\t}\n+\t\tif (!defined $pr->{'url_link'}) {\n+\t\t\t$pr->{'url_link'} = (git_get_project_url_list(\"$pr->{'path'}\"))[0] || \"\";\n+\t\t}\n \t\tif ($check_forks) {\n \t\t\tmy $pname = $pr->{'path'};\n \t\t\tif (($pname =~ s/\\.git$//) &&\n@@ -3661,6 +3664,7 @@ sub git_project_list_body {\n \t\t      $cgi->a({-href => href(project=>$pr->{'path'}, action=>\"shortlog\")}, \"shortlog\") . \" | \" .\n \t\t      $cgi->a({-href => href(project=>$pr->{'path'}, action=>\"log\")}, \"log\") . \" | \" .\n \t\t      $cgi->a({-href => href(project=>$pr->{'path'}, action=>\"tree\")}, \"tree\") .\n+\t\t      ($pr->{'url_link'} ? \" | \" . $cgi->a({-href => $pr->{'url_link'}}, \"git\") : '') .\n \t\t      ($pr->{'forks'} ? \" | \" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>\"forks\")}, \"forks\") : '') .\n \t\t      \"</td>\\n\" .\n \t\t      \"</tr>\\n\";\n-- \n1.5.5.4\n"},{"id":"86170","messageId":"20080804101200.GC811@erda.amd.com","threadId":"14760","inReplyTo":"1217796793.32240.36.camel@localhost.localdomain","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"Robert Richter","fromEmail":"robert.richter@amd.com","sentAt":"2008-08-04T10:12:01Z","receivedAt":"2008-08-04T10:12:01Z","isPatch":false,"sender":{"key":"robert.richter@amd.com","avatar":null},"body":"On 03.08.08 13:53:13, J.H. wrote:\n> Working on refactoring the patch so that it can go upstream, one of the\n> things I'm definitely making an assumption about (in my original code)\n> is that the base url will be uniform for the entire project_list (as it\n> is on kernel.org).  If that's acceptable I will probably be able to\n> submit something today, if not I will need to muck about and read out\n> the url from .git/cloneurl (which would be a rather hefty performance\n> hit - needing to read that from each repository)\n\nJohn,\n\nI just sent out a patch that implements this using cloneurl. It seemed\nsmall and easy to implement and so I just made the change myself.\n\nThank you anyway.\n\n-Robert\n\n-- \nAdvanced Micro Devices, Inc.\nOperating System Research Center\nemail: robert.richter@amd.com\n"},{"id":"86213","messageId":"1217867214.32240.61.camel@localhost.localdomain","threadId":"14760","inReplyTo":"20080804101200.GC811@erda.amd.com","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"J.H.","fromEmail":"warthog19@eaglescrag.net","sentAt":"2008-08-04T16:26:54Z","receivedAt":"2008-08-04T16:26:54Z","isPatch":false,"sender":{"key":"warthog19@eaglescrag.net","avatar":null},"body":"Robert,\n\nNoticed, but while I agree cloneurl is good - I think it kind of defeats\nthe purpose of what I was originally intending with the 'git' link.\nI've gone back in to understand cloneurl better and I genuinely think\nthis is the wrong approach (or at least not what was originally intended\nwith the 'git' link as I envisioned it).\n\nThe git link was always meant / intended to be a link to acquire the git\nrepository directly, and be independent of what is actually present in\nthe cloneurl file, specifically I wanted it to be a (1) git url\n(git://<hostname>/<path>) so that it took advantage of git specifically\nvs. accidentally giving you something with ssh or http. and (2) was\nuniform and did *not* depend on something in the repository as with\nlarge set of repositories, kernel.org, there is no way we can police\nthis and we explicitly do not want to have a script that automatically\nadds this or what not.\n\nI have two other concerns with the patch your proposing\n\n(1) it's on by default, and it seems that there are a number of sites\nthat don't actually want this functionality, making it a configurable\noption would seem prudent in that case\n\n(2) ignoring my comments on why I think using cloneurl for a large site\nis bad (after I looked into it), blindly on taking the first option in\nthe file may lead to the display of unexpected or unintended URLs.\n\nThat said, it's probably worth merging the two patches (since I'm\nalready there with the configuration options, etc) that way people can\nget either functionality should they choose.\n\n- John 'Warthog9' Hawley\n\nOn Mon, 2008-08-04 at 12:12 +0200, Robert Richter wrote:\n> On 03.08.08 13:53:13, J.H. wrote:\n> > Working on refactoring the patch so that it can go upstream, one of the\n> > things I'm definitely making an assumption about (in my original code)\n> > is that the base url will be uniform for the entire project_list (as it\n> > is on kernel.org).  If that's acceptable I will probably be able to\n> > submit something today, if not I will need to muck about and read out\n> > the url from .git/cloneurl (which would be a rather hefty performance\n> > hit - needing to read that from each repository)\n> \n> John,\n> \n> I just sent out a patch that implements this using cloneurl. It seemed\n> small and easy to implement and so I just made the change myself.\n> \n> Thank you anyway.\n> \n> -Robert\n> \n"},{"id":"86223","messageId":"20080804201020.GB32184@machine.or.cz","threadId":"14760","inReplyTo":"1217867214.32240.61.camel@localhost.localdomain","subject":"Re: Gitweb: Provide Git links in project list?","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-08-04T20:10:20Z","receivedAt":"2008-08-04T20:10:20Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"  Hi,\n\nOn Mon, Aug 04, 2008 at 09:26:54AM -0700, J.H. wrote:\n> The git link was always meant / intended to be a link to acquire the git\n> repository directly, and be independent of what is actually present in\n> the cloneurl file, specifically I wanted it to be a (1) git url\n> (git://<hostname>/<path>) so that it took advantage of git specifically\n> vs. accidentally giving you something with ssh or http.\n\n  we could grep the cloneurl.\n\n  The thing is, some sites like repo.or.cz don't use per-project\ncloneurl but do specify pull URLs by @git_base_url_list and this is\nintroducing unnecessary redundancy.\n\n> and (2) was\n> uniform and did *not* depend on something in the repository as with\n> large set of repositories, kernel.org, there is no way we can police\n> this and we explicitly do not want to have a script that automatically\n> adds this or what not.\n\n  Then why do you allow cloneurl in the repositories at all, if you\nthink the links won't be trustworthy? What is the fundamental difference\nbetween what you show on the project list page and the URLs in the\nproject summary page?\n\n> I have two other concerns with the patch your proposing\n> \n> (1) it's on by default, and it seems that there are a number of sites\n> that don't actually want this functionality, making it a configurable\n> option would seem prudent in that case\n\n  I actually plan to remove the 'log' link from the project list; I\nreally wonder about the practicality of the 'git' link... but if there\nwere any widely used browser integrations (like firing up git-gui when\nclicking on a git:// link), I *would* definitely see it more useful than\nthe 'log' link and add it to repo.or.cz. But I have never heard about\nanyone actually doing this (but I think it might make a lot of sense;\nthinking about it, I might try to patch msysgit to do this on Windows,\nthis would be nifty for my current dayjob project :).\n\n> That said, it's probably worth merging the two patches (since I'm\n> already there with the configuration options, etc) that way people can\n> get either functionality should they choose.\n\n  Configuration options are expensive on human users. Please let's not\nadd more too carelessly.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nThe next generation of interesting software will be done\non the Macintosh, not the IBM PC.  -- Bill Gates\n"}]}