{"thread":{"id":"5609","subject":"[RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage","startedAt":"2006-09-19T21:27:25Z","lastAt":"2006-10-09T20:36:19Z","messageCount":25,"participants":["Petr Baudis","Junio C Hamano","Jakub Narebski","Alan Chandler"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"27173","messageId":"20060919212725.GA13132@pasky.or.cz","threadId":"5609","inReplyTo":null,"subject":"[RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-19T21:27:25Z","receivedAt":"2006-09-19T21:27:25Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"It provides more useful information for causual Git users than the Git docs\n(especially about where to get Git and such).\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n gitweb/gitweb.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex c77270c..7ecd7df 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -1312,7 +1312,7 @@ EOF\n \tprint \"</head>\\n\" .\n \t      \"<body>\\n\" .\n \t      \"<div class=\\\"page_header\\\">\\n\" .\n-\t      \"<a href=\\\"http://www.kernel.org/pub/software/scm/git/docs/\\\" title=\\\"git documentation\\\">\" .\n+\t      \"<a href=\\\"http://git.or.cz/\\\" title=\\\"Git homepage\\\">\" .\n \t      \"<img src=\\\"$logo\\\" width=\\\"72\\\" height=\\\"27\\\" alt=\\\"git\\\" style=\\\"float:right; border-width:0px;\\\"/>\" .\n \t      \"</a>\\n\";\n \tprint $cgi->a({-href => esc_param($home_link)}, $home_link_str) . \" / \";\n"},{"id":"27470","messageId":"20060923125746.GJ8259@pasky.or.cz","threadId":"5609","inReplyTo":"20060919212725.GA13132@pasky.or.cz","subject":"Re: [RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-23T12:57:46Z","receivedAt":"2006-09-23T12:57:46Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, Sep 19, 2006 at 11:27:25PM CEST, I got a letter\nwhere Petr Baudis <pasky@suse.cz> said that...\n> It provides more useful information for causual Git users than the Git docs\n> (especially about where to get Git and such).\n> \n> Signed-off-by: Petr Baudis <pasky@suse.cz>\n\nPing?  This is the only gitweb patch still in my stg stack. I guess\nnoone really cares strongly either way since there were no comments.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"27503","messageId":"7virjes7dq.fsf@assigned-by-dhcp.cox.net","threadId":"5609","inReplyTo":"20060923125746.GJ8259@pasky.or.cz","subject":"Re: [RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-23T19:36:01Z","receivedAt":"2006-09-23T19:36:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> Dear diary, on Tue, Sep 19, 2006 at 11:27:25PM CEST, I got a letter\n> where Petr Baudis <pasky@suse.cz> said that...\n>> It provides more useful information for causual Git users than the Git docs\n>> (especially about where to get Git and such).\n>> \n>> Signed-off-by: Petr Baudis <pasky@suse.cz>\n>\n> Ping?  This is the only gitweb patch still in my stg stack. I guess\n> noone really cares strongly either way since there were no comments.\n\nI did not care either way, but I did not like either of these\nhardcoded strings in the code, and felt that if we are touching\nthat part of the code we also should be making real improvement\nat the same time ;-).  \n\nDoing something like this would let us update it easier, and \nlet people override with GITWEB_CONFIG if they want to.\n\n---\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 3d06181..ce90178 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -51,6 +51,9 @@ our $logo = \"++GITWEB_LOGO++\";\n # URI of GIT favicon, assumed to be image/png type\n our $favicon = \"++GITWEB_FAVICON++\";\n \n+our $githelp_url = \"http://git.or.cz/\";\n+our $githelp_label = \"git homepage\";\n+\n # source of projects list\n our $projects_list = \"++GITWEB_LIST++\";\n \n@@ -1335,7 +1338,9 @@ EOF\n \tprint \"</head>\\n\" .\n \t      \"<body>\\n\" .\n \t      \"<div class=\\\"page_header\\\">\\n\" .\n-\t      \"<a href=\\\"http://www.kernel.org/pub/software/scm/git/docs/\\\" title=\\\"git documentation\\\">\" .\n+\t      \"<a href=\\\"\" . esc_html($githelp_url) .\n+\t      \"\\\" title=\\\"\" . esc_html($githelp_label) .\n+\t      \"\\\">\" .\n \t      \"<img src=\\\"$logo\\\" width=\\\"72\\\" height=\\\"27\\\" alt=\\\"git\\\" style=\\\"float:right; border-width:0px;\\\"/>\" .\n \t      \"</a>\\n\";\n \tprint $cgi->a({-href => esc_param($home_link)}, $home_link_str) . \" / \";\n"},{"id":"27504","messageId":"20060923194643.GN13132@pasky.or.cz","threadId":"5609","inReplyTo":"7virjes7dq.fsf@assigned-by-dhcp.cox.net","subject":"Re: [RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-23T19:46:43Z","receivedAt":"2006-09-23T19:46:43Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sat, Sep 23, 2006 at 09:36:01PM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> said that...\n> Petr Baudis <pasky@suse.cz> writes:\n> \n> > Dear diary, on Tue, Sep 19, 2006 at 11:27:25PM CEST, I got a letter\n> > where Petr Baudis <pasky@suse.cz> said that...\n> >> It provides more useful information for causual Git users than the Git docs\n> >> (especially about where to get Git and such).\n> >> \n> >> Signed-off-by: Petr Baudis <pasky@suse.cz>\n> >\n> > Ping?  This is the only gitweb patch still in my stg stack. I guess\n> > noone really cares strongly either way since there were no comments.\n> \n> I did not care either way, but I did not like either of these\n> hardcoded strings in the code, and felt that if we are touching\n> that part of the code we also should be making real improvement\n> at the same time ;-).  \n> \n> Doing something like this would let us update it easier, and \n> let people override with GITWEB_CONFIG if they want to.\n\nReasonable.\n\nAcked-by: Petr Baudis <pasky@suse.cz>\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"27505","messageId":"ef43do$fm1$1@sea.gmane.org","threadId":"5609","inReplyTo":"7virjes7dq.fsf@assigned-by-dhcp.cox.net","subject":"Re: [RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-23T19:54:40Z","receivedAt":"2006-09-23T19:54:40Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> -             \"<a href=\\\"http://www.kernel.org/pub/software/scm/git/docs/\\\" title=\\\"git documentation\\\">\" .\n> +             \"<a href=\\\"\" . esc_html($githelp_url) .\n> +             \"\\\" title=\\\"\" . esc_html($githelp_label) .\n> +             \"\\\">\" .\n\nWhy not use $cgi->a_begin({-href=>esc_param($githelp_url), -title=>$githelp_label});\nor just plain $cgi->a and $cgi->img?\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"27509","messageId":"7vac4qs43g.fsf@assigned-by-dhcp.cox.net","threadId":"5609","inReplyTo":"ef43do$fm1$1@sea.gmane.org","subject":"Re: [RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-23T20:46:59Z","receivedAt":"2006-09-23T20:46:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>\n>> -             \"<a href=\\\"http://www.kernel.org/pub/software/scm/git/docs/\\\" title=\\\"git documentation\\\">\" .\n>> +             \"<a href=\\\"\" . esc_html($githelp_url) .\n>> +             \"\\\" title=\\\"\" . esc_html($githelp_label) .\n>> +             \"\\\">\" .\n>\n> Why not use $cgi->a_begin({-href=>esc_param($githelp_url), -title=>$githelp_label});\n> or just plain $cgi->a and $cgi->img?\n\nBe my guest and send in a proper patch please.\n\nI was merely demonstrating my preference on how definition of\ndefault values and actual use of them are separated.\n"},{"id":"28247","messageId":"20061005204752.GL20017@pasky.or.cz","threadId":"5609","inReplyTo":"20060923194643.GN13132@pasky.or.cz","subject":"Re: [RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-10-05T20:47:52Z","receivedAt":"2006-10-05T20:47:52Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sat, Sep 23, 2006 at 09:46:43PM CEST, I got a letter\nwhere Petr Baudis <pasky@suse.cz> said that...\n> Dear diary, on Sat, Sep 23, 2006 at 09:36:01PM CEST, I got a letter\n> where Junio C Hamano <junkio@cox.net> said that...\n> > Petr Baudis <pasky@suse.cz> writes:\n> > \n> > > Dear diary, on Tue, Sep 19, 2006 at 11:27:25PM CEST, I got a letter\n> > > where Petr Baudis <pasky@suse.cz> said that...\n> > >> It provides more useful information for causual Git users than the Git docs\n> > >> (especially about where to get Git and such).\n> > >> \n> > >> Signed-off-by: Petr Baudis <pasky@suse.cz>\n> > >\n> > > Ping?  This is the only gitweb patch still in my stg stack. I guess\n> > > noone really cares strongly either way since there were no comments.\n> > \n> > I did not care either way, but I did not like either of these\n> > hardcoded strings in the code, and felt that if we are touching\n> > that part of the code we also should be making real improvement\n> > at the same time ;-).  \n> > \n> > Doing something like this would let us update it easier, and \n> > let people override with GITWEB_CONFIG if they want to.\n> \n> Reasonable.\n> \n> Acked-by: Petr Baudis <pasky@suse.cz>\n\nSo, what happenned to this patch?\n\nThanks,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"28257","messageId":"7vhcyibgon.fsf@assigned-by-dhcp.cox.net","threadId":"5609","inReplyTo":"20061005204752.GL20017@pasky.or.cz","subject":"Re: [RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-05T21:23:20Z","receivedAt":"2006-10-05T21:23:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> Dear diary, on Sat, Sep 23, 2006 at 09:46:43PM CEST, I got a letter\n> where Petr Baudis <pasky@suse.cz> said that...\n>> Dear diary, on Sat, Sep 23, 2006 at 09:36:01PM CEST, I got a letter\n>> where Junio C Hamano <junkio@cox.net> said that...\n>> > Petr Baudis <pasky@suse.cz> writes:\n>> > \n>> > > Dear diary, on Tue, Sep 19, 2006 at 11:27:25PM CEST, I got a letter\n>> > > where Petr Baudis <pasky@suse.cz> said that...\n>> > >> It provides more useful information for causual Git users than the Git docs\n>> > >> (especially about where to get Git and such).\n>> > >> \n>> > >> Signed-off-by: Petr Baudis <pasky@suse.cz>\n>> > >\n>> > > Ping?  This is the only gitweb patch still in my stg stack. I guess\n>> > > noone really cares strongly either way since there were no comments.\n>> > \n>> > I did not care either way, but I did not like either of these\n>> > hardcoded strings in the code, and felt that if we are touching\n>> > that part of the code we also should be making real improvement\n>> > at the same time ;-).  \n>> > \n>> > Doing something like this would let us update it easier, and \n>> > let people override with GITWEB_CONFIG if they want to.\n>> \n>> Reasonable.\n>> \n>> Acked-by: Petr Baudis <pasky@suse.cz>\n>\n> So, what happenned to this patch?\n\nDid anybody send in an applicable patch?\n"},{"id":"28258","messageId":"7vbqoqbg5p.fsf@assigned-by-dhcp.cox.net","threadId":"5609","inReplyTo":"7vhcyibgon.fsf@assigned-by-dhcp.cox.net","subject":"Re: [RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-05T21:34:42Z","receivedAt":"2006-10-05T21:34:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> Petr Baudis <pasky@suse.cz> writes:\n>\n>>> > > Ping?  This is the only gitweb patch still in my stg stack. I guess\n>>> > > noone really cares strongly either way since there were no comments.\n>>> > \n>>> > I did not care either way, but I did not like either of these\n>>> > hardcoded strings in the code, and felt that if we are touching\n>>> > that part of the code we also should be making real improvement\n>>> > at the same time ;-).  \n>>> > \n>>> > Doing something like this would let us update it easier, and \n>>> > let people override with GITWEB_CONFIG if they want to.\n>>> \n>>> Reasonable.\n>>> \n>>> Acked-by: Petr Baudis <pasky@suse.cz>\n>>\n>> So, what happenned to this patch?\n>\n> Did anybody send in an applicable patch?\n\nAh, I found it; you do not have to re-send it.  But do you still\nwant it?\n"},{"id":"28261","messageId":"20061005235719.GM20017@pasky.or.cz","threadId":"5609","inReplyTo":"7vbqoqbg5p.fsf@assigned-by-dhcp.cox.net","subject":"Re: [RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-10-05T23:57:19Z","receivedAt":"2006-10-05T23:57:19Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Thu, Oct 05, 2006 at 11:34:42PM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> said that...\n> Junio C Hamano <junkio@cox.net> writes:\n> \n> > Petr Baudis <pasky@suse.cz> writes:\n> >\n> >>> > > Ping?  This is the only gitweb patch still in my stg stack. I guess\n> >>> > > noone really cares strongly either way since there were no comments.\n> >>> > \n> >>> > I did not care either way, but I did not like either of these\n> >>> > hardcoded strings in the code, and felt that if we are touching\n> >>> > that part of the code we also should be making real improvement\n> >>> > at the same time ;-).  \n> >>> > \n> >>> > Doing something like this would let us update it easier, and \n> >>> > let people override with GITWEB_CONFIG if they want to.\n> >>> \n> >>> Reasonable.\n> >>> \n> >>> Acked-by: Petr Baudis <pasky@suse.cz>\n> >>\n> >> So, what happenned to this patch?\n> >\n> > Did anybody send in an applicable patch?\n> \n> Ah, I found it; you do not have to re-send it.  But do you still\n> want it?\n\nYes. :-) (I wouldn't prod about it otherwise.)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"28281","messageId":"200610061231.06017.jnareb@gmail.com","threadId":"5609","inReplyTo":"7vac4qs43g.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-06T10:31:05Z","receivedAt":"2006-10-06T10:31:05Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Rename $githelp_url and $githelp_label to $logo_url and $logo_label to\nbe more obvious what they refer to; while at it add commented out\nprevious contents (git documentation at kernel.org). Add comment about\nlogo size.\n\nUse $cgi->a(...) to generate Git logo link; it automatically escapes\nattribute values when it is needed.  Escape href attribute using\nesc_url instead of (incorrect!) esc_html.\n\nMove styling of git logo <img> element from \"style\" attribute to CSS\nvia setting class to \"logo\".  Perhaps we should set it by id rather\nthan by class.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nJunio C Hamano wrote:\n\n>>> +             \"<a href=\\\"\" . esc_html($githelp_url) .\n>>> +             \"\\\" title=\\\"\" . esc_html($githelp_label) .\n>>> +             \"\\\">\" .\n>>\n>> Why not use $cgi->a_begin({-href=>esc_param($githelp_url),\n>> -title=>$githelp_label}); or just plain $cgi->a and $cgi->img?\n>\n> Be my guest and send in a proper patch please.\n>\n> I was merely demonstrating my preference on how definition of\n> default values and actual use of them are separated.\n\nAnd here it is. By the way, esc_html was incorrect, I think.\n\n gitweb/gitweb.css  |    5 +++++\n gitweb/gitweb.perl |   17 +++++++++--------\n 2 files changed, 14 insertions(+), 8 deletions(-)\n\ndiff --git a/gitweb/gitweb.css b/gitweb/gitweb.css\nindex 668e69a..3f62b6d 100644\n--- a/gitweb/gitweb.css\n+++ b/gitweb/gitweb.css\n@@ -16,6 +16,11 @@ a:hover, a:visited, a:active {\n \tcolor: #880000;\n }\n \n+img.logo {\n+\tfloat: right;\n+\tborder-width: 0px;\n+}\n+\n div.page_header {\n \theight: 25px;\n \tpadding: 8px;\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 3320069..a966f9f 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -46,13 +46,16 @@ our $home_text = \"++GITWEB_HOMETEXT++\";\n \n # URI of default stylesheet\n our $stylesheet = \"++GITWEB_CSS++\";\n-# URI of GIT logo\n+# URI of GIT logo (72x27 size)\n our $logo = \"++GITWEB_LOGO++\";\n # URI of GIT favicon, assumed to be image/png type\n our $favicon = \"++GITWEB_FAVICON++\";\n \n-our $githelp_url = \"http://git.or.cz/\";\n-our $githelp_label = \"git homepage\";\n+# URI and label (title) of GIT logo link\n+#our $logo_url = \"http://www.kernel.org/pub/software/scm/git/docs/\";\n+#our $logo_label = \"git documentation\";\n+our $logo_url = \"http://git.or.cz/\";\n+our $logo_label = \"git homepage\";\n \n # source of projects list\n our $projects_list = \"++GITWEB_LIST++\";\n@@ -1376,11 +1379,9 @@ EOF\n \tprint \"</head>\\n\" .\n \t      \"<body>\\n\" .\n \t      \"<div class=\\\"page_header\\\">\\n\" .\n-\t      \"<a href=\\\"\" . esc_html($githelp_url) .\n-\t      \"\\\" title=\\\"\" . esc_html($githelp_label) .\n-\t      \"\\\">\" .\n-\t      \"<img src=\\\"$logo\\\" width=\\\"72\\\" height=\\\"27\\\" alt=\\\"git\\\" style=\\\"float:right; border-width:0px;\\\"/>\" .\n-\t      \"</a>\\n\";\n+\t      $cgi->a({-href => esc_url($logo_url),\n+\t               -title => $logo_label},\n+\t              qq(<img src=\"$logo\" width=\"72\" height=\"27\" alt=\"git\" class=\"logo\"/>));\n \tprint $cgi->a({-href => esc_url($home_link)}, $home_link_str) . \" / \";\n \tif (defined $project) {\n \t\tprint $cgi->a({-href => href(action=>\"summary\")}, esc_html($project));\n-- \n1.4.2.1\n"},{"id":"28342","messageId":"7viriwwmid.fsf@assigned-by-dhcp.cox.net","threadId":"5609","inReplyTo":"200610061231.06017.jnareb@gmail.com","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-07T08:36:26Z","receivedAt":"2006-10-07T08:36:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Rename $githelp_url and $githelp_label to $logo_url and $logo_label to\n> be more obvious what they refer to; while at it add commented out\n> previous contents (git documentation at kernel.org). Add comment about\n> logo size.\n>\n> Use $cgi->a(...) to generate Git logo link; it automatically escapes\n> attribute values when it is needed.  Escape href attribute using\n> esc_url instead of (incorrect!) esc_html.\n\nIn principle, I am not sure renaming the variables is a good\nidea in general.  Renaming them means you are burning people who\nhave custom help link defined in their gitweb_config.perl file,\nso unless the new variable names are ten times better than the\ncurrent one I do not think it is worth doing.\n\nThese variables, however, have never been in any official\nrelease nor -rc yet, and have only been there for exactly two\nweeks, so if we are going to rename them, we'd better do so now.\nAnd the variables are about the same thing described by $logo\nvariable, so the new names probably make more sense.\n\nHaving said that, I am wondering if it is worth doing something\nlike this:\n\n\nsub img_button {\n\tmy $it = $_[0];\n\tmy @attr = ();\n        for my $attr (qw(src width height alt class id)) {\n\t\tnext unless exists $it->{$attr};\n                push @attr, \"$attr=\\\"\" . esc_attr($it->{$attr}) . '\"';\n\t}\n\tmy $img = '<img ' . join(' ', @attr) . ' />';\n\tprint $cgi->a({ -href => esc_url($it->{'url'}),\n        \t\t-title => esc_attr($it->{'title'}),\n                      }, $img);\n}\n\nour %logo = (\n\t# logo image button\n\tsrc => '++GITWEB_LOGO++',\n        width => 72,\n        height => 27,\n\talt => 'git logo',\n\n\t# where that link leads to\n        url => 'http:/git.or.cz/',\n\ttitle => 'git homepage',\n);\n"},{"id":"28350","messageId":"200610071158.26211.jnareb@gmail.com","threadId":"5609","inReplyTo":"7viriwwmid.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-07T09:58:25Z","receivedAt":"2006-10-07T09:58:25Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> Having said that, I am wondering if it is worth doing something\n> like this:\n> \n> \n> sub img_button {\n> \tmy $it = $_[0];\n> \tmy @attr = ();\n>         for my $attr (qw(src width height alt class id)) {\n> \t\tnext unless exists $it->{$attr};\n>                 push @attr, \"$attr=\\\"\" . esc_attr($it->{$attr}) . '\"';\n> \t}\n> \tmy $img = '<img ' . join(' ', @attr) . ' />';\n> \tprint $cgi->a({ -href => esc_url($it->{'url'}),\n>         \t\t-title => esc_attr($it->{'title'}),\n>                       }, $img);\n> }\n> \n> our %logo = (\n> \t# logo image button\n> \tsrc => '++GITWEB_LOGO++',\n>         width => 72,\n>         height => 27,\n> \talt => 'git logo',\n> \n> \t# where that link leads to\n>         url => 'http:/git.or.cz/',\n> \ttitle => 'git homepage',\n> );\n\nYou forgot to add style, i.e. either id => 'logo' or class => 'logo'. \n\nI'm not sure if it is worth complication. We have similar situation \n(although without image) with $home_link and $home_link_str (as with \n$logo, $logo_url, $logo_label).\n\nI wonder how many people use non-standard logo image, or non standard \nfavicon...\n-- \nJakub Narebski\nPoland\n"},{"id":"28370","messageId":"200610071514.33106.alan@chandlerfamily.org.uk","threadId":"5609","inReplyTo":"200610071158.26211.jnareb@gmail.com","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2006-10-07T14:14:33Z","receivedAt":"2006-10-07T14:14:33Z","isPatch":true,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Saturday 07 October 2006 10:58, Jakub Narebski wrote:\n\n> I wonder how many people use non-standard logo image, or non standard\n> favicon...\n\nI'm using a non standard favicon to make it consistent with the rest of my \nsite.\n\nThat said, I like the revised form.\n\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\n"},{"id":"28421","messageId":"egauic$1l2$1@sea.gmane.org","threadId":"5609","inReplyTo":"200610061231.06017.jnareb@gmail.com","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-08T13:31:48Z","receivedAt":"2006-10-08T13:31:48Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Was this patch dropped? Postponed to after release?\nWaiting for better patch (but this correct esc_html-ing URL...)?\n\n-- \nJakub Narebski\n"},{"id":"28427","messageId":"7vwt7aio8l.fsf@assigned-by-dhcp.cox.net","threadId":"5609","inReplyTo":"egauic$1l2$1@sea.gmane.org","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-08T19:47:22Z","receivedAt":"2006-10-08T19:47:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Was this patch dropped? Postponed to after release?\n> Waiting for better patch (but this correct esc_html-ing URL...)?\n\nPretty much the last one -- waiting for a patch directly\napplicable from my e-mail client.  As far as I can recall there\nhas been none in the thread.\n"},{"id":"28431","messageId":"20061008201031.GL20017@pasky.or.cz","threadId":"5609","inReplyTo":"7vwt7aio8l.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-10-08T20:10:31Z","receivedAt":"2006-10-08T20:10:31Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sun, Oct 08, 2006 at 09:47:22PM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> said that...\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n> > Was this patch dropped? Postponed to after release?\n> > Waiting for better patch (but this correct esc_html-ing URL...)?\n> \n> Pretty much the last one -- waiting for a patch directly\n> applicable from my e-mail client.  As far as I can recall there\n> has been none in the thread.\n\nIs there a problem with taking <200610061231.06017.jnareb@gmail.com>?\n\nI think it's currently not worth the complexity and breakage of\nbackwards compatibility to do the more elaborate form you proposed.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"28433","messageId":"200610082217.25457.jnareb@gmail.com","threadId":"5609","inReplyTo":"7vwt7aio8l.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-08T20:17:24Z","receivedAt":"2006-10-08T20:17:24Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Rename $githelp_url and $githelp_label to $logo_url and $logo_label to\nbe more obvious what they refer to; while at it add commented out\nprevious contents (git documentation at kernel.org). Add comment about\nlogo size.\n\nUse $cgi->a(...) to generate Git logo link; it automatically escapes\nattribute values when it is needed.  Escape href attribute using\nesc_url instead of (incorrect!) esc_html.\n\nMove styling of git logo <img> element from \"style\" attribute to CSS\nvia setting class to \"logo\".  Perhaps we should set it by id rather\nthan by class.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nI hope that this version is applicable...\n\n gitweb/gitweb.css  |    5 +++++\n gitweb/gitweb.perl |   17 +++++++++--------\n 2 files changed, 14 insertions(+), 8 deletions(-)\n\ndiff --git a/gitweb/gitweb.css b/gitweb/gitweb.css\nindex 668e69a..3f62b6d 100644\n--- a/gitweb/gitweb.css\n+++ b/gitweb/gitweb.css\n@@ -16,6 +16,11 @@ a:hover, a:visited, a:active {\n \tcolor: #880000;\n }\n \n+img.logo {\n+\tfloat: right;\n+\tborder-width: 0px;\n+}\n+\n div.page_header {\n \theight: 25px;\n \tpadding: 8px;\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 3320069..a966f9f 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -46,13 +46,16 @@ our $home_text = \"++GITWEB_HOMETEXT++\";\n \n # URI of default stylesheet\n our $stylesheet = \"++GITWEB_CSS++\";\n-# URI of GIT logo\n+# URI of GIT logo (72x27 size)\n our $logo = \"++GITWEB_LOGO++\";\n # URI of GIT favicon, assumed to be image/png type\n our $favicon = \"++GITWEB_FAVICON++\";\n \n-our $githelp_url = \"http://git.or.cz/\";\n-our $githelp_label = \"git homepage\";\n+# URI and label (title) of GIT logo link\n+#our $logo_url = \"http://www.kernel.org/pub/software/scm/git/docs/\";\n+#our $logo_label = \"git documentation\";\n+our $logo_url = \"http://git.or.cz/\";\n+our $logo_label = \"git homepage\";\n \n # source of projects list\n our $projects_list = \"++GITWEB_LIST++\";\n@@ -1376,11 +1379,9 @@ EOF\n \tprint \"</head>\\n\" .\n \t      \"<body>\\n\" .\n \t      \"<div class=\\\"page_header\\\">\\n\" .\n-\t      \"<a href=\\\"\" . esc_html($githelp_url) .\n-\t      \"\\\" title=\\\"\" . esc_html($githelp_label) .\n-\t      \"\\\">\" .\n-\t      \"<img src=\\\"$logo\\\" width=\\\"72\\\" height=\\\"27\\\" alt=\\\"git\\\" style=\\\"float:right; border-width:0px;\\\"/>\" .\n-\t      \"</a>\\n\";\n+\t      $cgi->a({-href => esc_url($logo_url),\n+\t               -title => $logo_label},\n+\t              qq(<img src=\"$logo\" width=\"72\" height=\"27\" alt=\"git\" class=\"logo\"/>));\n \tprint $cgi->a({-href => esc_url($home_link)}, $home_link_str) . \" / \";\n \tif (defined $project) {\n \t\tprint $cgi->a({-href => href(action=>\"summary\")}, esc_html($project));\n-- \n1.4.2.1\n"},{"id":"28434","messageId":"7vbqomim46.fsf@assigned-by-dhcp.cox.net","threadId":"5609","inReplyTo":"20061008201031.GL20017@pasky.or.cz","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-08T20:33:13Z","receivedAt":"2006-10-08T20:33:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> Is there a problem with taking <200610061231.06017.jnareb@gmail.com>?\n>\n> I think it's currently not worth the complexity and breakage of\n> backwards compatibility to do the more elaborate form you proposed.\n\nI agree with that, except that the 72x27 dimension bit troubles\nme.\n"},{"id":"28435","messageId":"egbogh$d7d$1@sea.gmane.org","threadId":"5609","inReplyTo":"7vbqomim46.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-08T20:54:34Z","receivedAt":"2006-10-08T20:54:34Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> Petr Baudis <pasky@suse.cz> writes:\n> \n>> Is there a problem with taking <200610061231.06017.jnareb@gmail.com>?\n>>\n>> I think it's currently not worth the complexity and breakage of\n>> backwards compatibility to do the more elaborate form you proposed.\n> \n> I agree with that, except that the 72x27 dimension bit troubles\n> me.\n\nFirst, that's the problem for the future. The 72x27 was there, I have not\nintroduced this. \n\nSecond, 72x27 is size override, so although logo would better be 72x27,\nbut if it is not it will be scaled to given size.\n  http://www.w3.org/TR/html401/struct/objects.html#visual\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"28440","messageId":"7vac46gvg8.fsf@assigned-by-dhcp.cox.net","threadId":"5609","inReplyTo":"egbogh$d7d$1@sea.gmane.org","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-09T00:54:31Z","receivedAt":"2006-10-09T00:54:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>\n>> Petr Baudis <pasky@suse.cz> writes:\n>> \n>>> Is there a problem with taking <200610061231.06017.jnareb@gmail.com>?\n>>>\n>>> I think it's currently not worth the complexity and breakage of\n>>> backwards compatibility to do the more elaborate form you proposed.\n>> \n>> I agree with that, except that the 72x27 dimension bit troubles\n>> me.\n>\n> First, that's the problem for the future. The 72x27 was there, I have not\n> introduced this. \n\nThat's exactly my point.  This is not a \"placing blame\" game.\n\nIt just feels wrong to update only two things when we already\nknow there are others that need fixing in a very similar way.\n"},{"id":"28448","messageId":"200610090914.59834.jnareb@gmail.com","threadId":"5609","inReplyTo":"7vac46gvg8.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-09T07:14:59Z","receivedAt":"2006-10-09T07:14:59Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n>> Junio C Hamano wrote:\n>>\n>>> Petr Baudis <pasky@suse.cz> writes:\n>>> \n>>>> Is there a problem with taking <200610061231.06017.jnareb@gmail.com>?\n>>>>\n>>>> I think it's currently not worth the complexity and breakage of\n>>>> backwards compatibility to do the more elaborate form you proposed.\n>>> \n>>> I agree with that, except that the 72x27 dimension bit troubles\n>>> me.\n>>\n>> First, that's the problem for the future. The 72x27 was there, I have not\n>> introduced this. \n> \n> That's exactly my point.  This is not a \"placing blame\" game.\n> \n> It just feels wrong to update only two things when we already\n> know there are others that need fixing in a very similar way.\n \nWell, I'd rather have it corrected, than wait for generalized version\nwhich would allow to set dimensions and stuff... which is most probably\nnot needed.\n\nPartial improvement is better than no improvement (especially as it\ncorrects 'href=\"'.esc_html($githelp_url).'\"' bug).\n-- \nJakub Narebski\nPoland\n"},{"id":"28449","messageId":"7vvemtdfst.fsf@assigned-by-dhcp.cox.net","threadId":"5609","inReplyTo":"200610090914.59834.jnareb@gmail.com","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-09T09:00:50Z","receivedAt":"2006-10-09T09:00:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Partial improvement is better than no improvement.\n\nNot necessarily.  As the maintainer, I found that when we say\n\"we will fix it later\", later tend to never come, and one\neffective way to fight that tendency is to prod the contributors\na bit harder, which worked reasonably well so far.\n"},{"id":"28450","messageId":"200610091126.17055.jnareb@gmail.com","threadId":"5609","inReplyTo":"7vvemtdfst.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-09T09:26:16Z","receivedAt":"2006-10-09T09:26:16Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n> > Partial improvement is better than no improvement.\n> \n> Not necessarily.  As the maintainer, I found that when we say\n> \"we will fix it later\", later tend to never come, and one\n> effective way to fight that tendency is to prod the contributors\n> a bit harder, which worked reasonably well so far.\n\nWell. Perhaps.\n\nBut first, it is also bugfix for esc_html on URL, and second I though \nyou rather have one feature per patch; this one has two - cleanup of \nlogo generation, and moving style to CSS. \"Better\" patch would have \nthree...\n\n-- \nJakub Narebski\nPoland\n"},{"id":"28460","messageId":"20061009203619.GN20017@pasky.or.cz","threadId":"5609","inReplyTo":"7vvemtdfst.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-10-09T20:36:19Z","receivedAt":"2006-10-09T20:36:19Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Oct 09, 2006 at 11:00:50AM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> said that...\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n> > Partial improvement is better than no improvement.\n> \n> Not necessarily.  As the maintainer, I found that when we say\n> \"we will fix it later\", later tend to never come, and one\n> effective way to fight that tendency is to prod the contributors\n> a bit harder, which worked reasonably well so far.\n\nIf later tends to never come, it means apparently noone really needs it.\n:-)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"}]}