{"thread":{"id":"5052","subject":"[PATCH] gitweb: use out-of-line GIT logo.","startedAt":"2006-07-30T22:38:39Z","lastAt":"2006-07-31T07:02:37Z","messageCount":4,"participants":["Martin Waitz","Luben Tuikov","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"24392","messageId":"20060730223839.GB16364@admingilde.org","threadId":"5052","inReplyTo":null,"subject":"[PATCH] gitweb: use out-of-line GIT logo.","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-07-30T22:38:39Z","receivedAt":"2006-07-30T22:38:39Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"Use the normal web server instead of the CGI to provide the git logo,\njust like the gitweb.css.\n\nSigned-off-by: Martin Waitz <tali@admingilde.org>\n---\n Makefile            |    2 ++\n gitweb/README       |    2 ++\n gitweb/git-logo.png |  Bin\n gitweb/gitweb.pl    |   29 ++++-------------------------\n 4 files changed, 8 insertions(+), 25 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex bd59d6b58d1cfcaecd033f186d7c2cc537416b75..40e129490b337a70f0ee5c60ce25980359e658c9 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -122,6 +122,7 @@ GITWEB_PROJECTROOT = /pub/git\n GITWEB_LIST = \n GITWEB_HOMETEXT = indextext.html\n GITWEB_CSS = gitweb.css\n+GITWEB_LOGO = git-logo.png\n \n export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR\n \n@@ -584,6 +585,7 @@ gitweb/gitweb.cgi: gitweb/gitweb.pl\n \t    -e 's|@@GITWEB_LIST@@|$(GITWEB_LIST)|g' \\\n \t    -e 's|@@GITWEB_HOMETEXT@@|$(GITWEB_HOMETEXT)|g' \\\n \t    -e 's|@@GITWEB_CSS@@|$(GITWEB_CSS)|g' \\\n+\t    -e 's|@@GITWEB_LOGO@@|$(GITWEB_LOGO)|g' \\\n \t    $< >$@+\n \tchmod +x $@+\n \tmv $@+ $@\ndiff --git a/gitweb/README b/gitweb/README\nindex ed939e2fb5264cce24e770272583b12372c3ab68..1b2180c7314ea3d10db78c88b48092a70491f8b8 100644\n--- a/gitweb/README\n+++ b/gitweb/README\n@@ -21,6 +21,8 @@ You can specify the following configurat\n    overview page.\n  * GITWEB_CSS\n    Points to the location where you put gitweb.css on your web server.\n+ * GITWEB_LOGO\n+   Points to the location where you put git-logo.png on your web server.\n \n Any comment/question/concern to:\n   Kay Sievers <kay.sievers@vrfy.org>\ndiff --git a/gitweb/git-logo.png b/gitweb/git-logo.png\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..16ae8d5382de5ffe63b54139245143513a87446e\nGIT binary patch\nliteral 208\nzc%17D@N?(olHy`uVBq!ia0vp^9zZP3!VDyJZ(h*_QW60^A+G=b|4&GW-LQTYLj%LP\nzv&RoGFuZv2?ECj`Q+bxV1Jx9Jx;TbtoKN;hS77mqk>KLcN(xR?VB+A-bX~J>A)^7$\nz<ODOdpotq91+P5}P07hQlas@<h^Ig+iB0QZlI&(irr;$UFBq65)WQU>JXDx2{a_29\nzsY;<{(@cXMleq+Ux^^7wU9iYSkxkvP$)WY2Yo|g1Bf}C~#iK$pv;G0CXYh3Ob6Mw<\nG&;$VMfkjjR\n\ndiff --git a/gitweb/gitweb.pl b/gitweb/gitweb.pl\nindex 8e05c335f801d4c52a9b348fa56fccfae36ce621..e6e9f83076630958d0134bfbb29989882f6f1d0d 100755\n--- a/gitweb/gitweb.pl\n+++ b/gitweb/gitweb.pl\n@@ -51,6 +51,8 @@ our $home_text = \"@@GITWEB_HOMETEXT@@\";\n \n # URI of default stylesheet\n our $stylesheet = \"@@GITWEB_CSS@@\";\n+# URI of GIT logo\n+our $logo = \"@@GITWEB_LOGO@@\";\n \n # source of projects list\n our $projects_list = \"@@GITWEB_LIST@@\" || \"$projectroot\";\n@@ -70,10 +72,7 @@ if (defined $action) {\n \t\tundef $action;\n \t\tdie_error(undef, \"Invalid action parameter.\");\n \t}\n-\tif ($action eq \"git-logo.png\") {\n-\t\tgit_logo();\n-\t\texit;\n-\t} elsif ($action eq \"opml\") {\n+\tif ($action eq \"opml\") {\n \t\tgit_opml();\n \t\texit;\n \t}\n@@ -320,7 +319,7 @@ sub git_header_html {\n EOF\n \tprint \"<div class=\\\"page_header\\\">\\n\" .\n \t      \"<a href=\\\"http://www.kernel.org/pub/software/scm/git/docs/\\\" title=\\\"git documentation\\\">\" .\n-\t      \"<img src=\\\"$my_uri?\" . esc_param(\"a=git-logo.png\") . \"\\\" width=\\\"72\\\" height=\\\"27\\\" alt=\\\"git\\\" style=\\\"float:right; border-width:0px;\\\"/>\" .\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)}, \"projects\") . \" / \";\n \tif (defined $project) {\n@@ -755,26 +754,6 @@ sub date_str {\n \treturn %date;\n }\n \n-# git-logo (cached in browser for one day)\n-sub git_logo {\n-\tbinmode STDOUT, ':raw';\n-\tprint $cgi->header(-type => 'image/png', -expires => '+1d');\n-\t# cat git-logo.png | hexdump -e '16/1 \" %02x\"  \"\\n\"' | sed 's/ /\\\\x/g'\n-\tprint\t\"\\x89\\x50\\x4e\\x47\\x0d\\x0a\\x1a\\x0a\\x00\\x00\\x00\\x0d\\x49\\x48\\x44\\x52\" .\n-\t\t\"\\x00\\x00\\x00\\x48\\x00\\x00\\x00\\x1b\\x04\\x03\\x00\\x00\\x00\\x2d\\xd9\\xd4\" .\n-\t\t\"\\x2d\\x00\\x00\\x00\\x18\\x50\\x4c\\x54\\x45\\xff\\xff\\xff\\x60\\x60\\x5d\\xb0\" .\n-\t\t\"\\xaf\\xaa\\x00\\x80\\x00\\xce\\xcd\\xc7\\xc0\\x00\\x00\\xe8\\xe8\\xe6\\xf7\\xf7\" .\n-\t\t\"\\xf6\\x95\\x0c\\xa7\\x47\\x00\\x00\\x00\\x73\\x49\\x44\\x41\\x54\\x28\\xcf\\x63\" .\n-\t\t\"\\x48\\x67\\x20\\x04\\x4a\\x5c\\x18\\x0a\\x08\\x2a\\x62\\x53\\x61\\x20\\x02\\x08\" .\n-\t\t\"\\x0d\\x69\\x45\\xac\\xa1\\xa1\\x01\\x30\\x0c\\x93\\x60\\x36\\x26\\x52\\x91\\xb1\" .\n-\t\t\"\\x01\\x11\\xd6\\xe1\\x55\\x64\\x6c\\x6c\\xcc\\x6c\\x6c\\x0c\\xa2\\x0c\\x70\\x2a\" .\n-\t\t\"\\x62\\x06\\x2a\\xc1\\x62\\x1d\\xb3\\x01\\x02\\x53\\xa4\\x08\\xe8\\x00\\x03\\x18\" .\n-\t\t\"\\x26\\x56\\x11\\xd4\\xe1\\x20\\x97\\x1b\\xe0\\xb4\\x0e\\x35\\x24\\x71\\x29\\x82\" .\n-\t\t\"\\x99\\x30\\xb8\\x93\\x0a\\x11\\xb9\\x45\\x88\\xc1\\x8d\\xa0\\xa2\\x44\\x21\\x06\" .\n-\t\t\"\\x27\\x41\\x82\\x40\\x85\\xc1\\x45\\x89\\x20\\x70\\x01\\x00\\xa4\\x3d\\x21\\xc5\" .\n-\t\t\"\\x12\\x1c\\x9a\\xfe\\x00\\x00\\x00\\x00\\x49\\x45\\x4e\\x44\\xae\\x42\\x60\\x82\";\n-}\n-\n sub get_file_owner {\n \tmy $path = shift;\n \n-- \n1.4.2.rc2.gf055\n\n-- \nMartin Waitz\n"},{"id":"24404","messageId":"20060731035904.53458.qmail@web31813.mail.mud.yahoo.com","threadId":"5052","inReplyTo":"20060730223839.GB16364@admingilde.org","subject":"Re: [PATCH] gitweb: use out-of-line GIT logo.","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-07-31T03:59:04Z","receivedAt":"2006-07-31T03:59:04Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Martin Waitz <tali@admingilde.org> wrote:\n\n> Use the normal web server instead of the CGI to provide the git logo,\n> just like the gitweb.css.\n\nNACK.  I'd really rather keep the logo (which is essential) in the\nfile itself.  This would mean one less file to worry about.\n\n   Luben\n\n \n> Signed-off-by: Martin Waitz <tali@admingilde.org>\n> ---\n>  Makefile            |    2 ++\n>  gitweb/README       |    2 ++\n>  gitweb/git-logo.png |  Bin\n>  gitweb/gitweb.pl    |   29 ++++-------------------------\n>  4 files changed, 8 insertions(+), 25 deletions(-)\n> \n> diff --git a/Makefile b/Makefile\n> index bd59d6b58d1cfcaecd033f186d7c2cc537416b75..40e129490b337a70f0ee5c60ce25980359e658c9 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -122,6 +122,7 @@ GITWEB_PROJECTROOT = /pub/git\n>  GITWEB_LIST = \n>  GITWEB_HOMETEXT = indextext.html\n>  GITWEB_CSS = gitweb.css\n> +GITWEB_LOGO = git-logo.png\n>  \n>  export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR\n>  \n> @@ -584,6 +585,7 @@ gitweb/gitweb.cgi: gitweb/gitweb.pl\n>  \t    -e 's|@@GITWEB_LIST@@|$(GITWEB_LIST)|g' \\\n>  \t    -e 's|@@GITWEB_HOMETEXT@@|$(GITWEB_HOMETEXT)|g' \\\n>  \t    -e 's|@@GITWEB_CSS@@|$(GITWEB_CSS)|g' \\\n> +\t    -e 's|@@GITWEB_LOGO@@|$(GITWEB_LOGO)|g' \\\n>  \t    $< >$@+\n>  \tchmod +x $@+\n>  \tmv $@+ $@\n> diff --git a/gitweb/README b/gitweb/README\n> index ed939e2fb5264cce24e770272583b12372c3ab68..1b2180c7314ea3d10db78c88b48092a70491f8b8 100644\n> --- a/gitweb/README\n> +++ b/gitweb/README\n> @@ -21,6 +21,8 @@ You can specify the following configurat\n>     overview page.\n>   * GITWEB_CSS\n>     Points to the location where you put gitweb.css on your web server.\n> + * GITWEB_LOGO\n> +   Points to the location where you put git-logo.png on your web server.\n>  \n>  Any comment/question/concern to:\n>    Kay Sievers <kay.sievers@vrfy.org>\n> diff --git a/gitweb/git-logo.png b/gitweb/git-logo.png\n> new file mode 100644\n> index 0000000000000000000000000000000000000000..16ae8d5382de5ffe63b54139245143513a87446e\n> GIT binary patch\n> literal 208\n> zc%17D@N?(olHy`uVBq!ia0vp^9zZP3!VDyJZ(h*_QW60^A+G=b|4&GW-LQTYLj%LP\n> zv&RoGFuZv2?ECj`Q+bxV1Jx9Jx;TbtoKN;hS77mqk>KLcN(xR?VB+A-bX~J>A)^7$\n> z<ODOdpotq91+P5}P07hQlas@<h^Ig+iB0QZlI&(irr;$UFBq65)WQU>JXDx2{a_29\n> zsY;<{(@cXMleq+Ux^^7wU9iYSkxkvP$)WY2Yo|g1Bf}C~#iK$pv;G0CXYh3Ob6Mw<\n> G&;$VMfkjjR\n> \n> diff --git a/gitweb/gitweb.pl b/gitweb/gitweb.pl\n> index 8e05c335f801d4c52a9b348fa56fccfae36ce621..e6e9f83076630958d0134bfbb29989882f6f1d0d 100755\n> --- a/gitweb/gitweb.pl\n> +++ b/gitweb/gitweb.pl\n> @@ -51,6 +51,8 @@ our $home_text = \"@@GITWEB_HOMETEXT@@\";\n>  \n>  # URI of default stylesheet\n>  our $stylesheet = \"@@GITWEB_CSS@@\";\n> +# URI of GIT logo\n> +our $logo = \"@@GITWEB_LOGO@@\";\n>  \n>  # source of projects list\n>  our $projects_list = \"@@GITWEB_LIST@@\" || \"$projectroot\";\n> @@ -70,10 +72,7 @@ if (defined $action) {\n>  \t\tundef $action;\n>  \t\tdie_error(undef, \"Invalid action parameter.\");\n>  \t}\n> -\tif ($action eq \"git-logo.png\") {\n> -\t\tgit_logo();\n> -\t\texit;\n> -\t} elsif ($action eq \"opml\") {\n> +\tif ($action eq \"opml\") {\n>  \t\tgit_opml();\n>  \t\texit;\n>  \t}\n> @@ -320,7 +319,7 @@ sub git_header_html {\n>  EOF\n>  \tprint \"<div class=\\\"page_header\\\">\\n\" .\n>  \t      \"<a href=\\\"http://www.kernel.org/pub/software/scm/git/docs/\\\" title=\\\"git\n> documentation\\\">\" .\n> -\t      \"<img src=\\\"$my_uri?\" . esc_param(\"a=git-logo.png\") . \"\\\" width=\\\"72\\\" height=\\\"27\\\"\n> alt=\\\"git\\\" style=\\\"float:right; border-width:0px;\\\"/>\" .\n> +\t      \"<img src=\\\"$logo\\\" width=\\\"72\\\" height=\\\"27\\\" alt=\\\"git\\\" style=\\\"float:right;\n> border-width:0px;\\\"/>\" .\n>  \t      \"</a>\\n\";\n>  \tprint $cgi->a({-href => esc_param($home_link)}, \"projects\") . \" / \";\n>  \tif (defined $project) {\n> @@ -755,26 +754,6 @@ sub date_str {\n>  \treturn %date;\n>  }\n>  \n> -# git-logo (cached in browser for one day)\n> -sub git_logo {\n> -\tbinmode STDOUT, ':raw';\n> -\tprint $cgi->header(-type => 'image/png', -expires => '+1d');\n> -\t# cat git-logo.png | hexdump -e '16/1 \" %02x\"  \"\\n\"' | sed 's/ /\\\\x/g'\n> -\tprint\t\"\\x89\\x50\\x4e\\x47\\x0d\\x0a\\x1a\\x0a\\x00\\x00\\x00\\x0d\\x49\\x48\\x44\\x52\" .\n> -\t\t\"\\x00\\x00\\x00\\x48\\x00\\x00\\x00\\x1b\\x04\\x03\\x00\\x00\\x00\\x2d\\xd9\\xd4\" .\n> -\t\t\"\\x2d\\x00\\x00\\x00\\x18\\x50\\x4c\\x54\\x45\\xff\\xff\\xff\\x60\\x60\\x5d\\xb0\" .\n> -\t\t\"\\xaf\\xaa\\x00\\x80\\x00\\xce\\xcd\\xc7\\xc0\\x00\\x00\\xe8\\xe8\\xe6\\xf7\\xf7\" .\n> -\t\t\"\\xf6\\x95\\x0c\\xa7\\x47\\x00\\x00\\x00\\x73\\x49\\x44\\x41\\x54\\x28\\xcf\\x63\" .\n> -\t\t\"\\x48\\x67\\x20\\x04\\x4a\\x5c\\x18\\x0a\\x08\\x2a\\x62\\x53\\x61\\x20\\x02\\x08\" .\n> -\t\t\"\\x0d\\x69\\x45\\xac\\xa1\\xa1\\x01\\x30\\x0c\\x93\\x60\\x36\\x26\\x52\\x91\\xb1\" .\n> -\t\t\"\\x01\\x11\\xd6\\xe1\\x55\\x64\\x6c\\x6c\\xcc\\x6c\\x6c\\x0c\\xa2\\x0c\\x70\\x2a\" .\n> -\t\t\"\\x62\\x06\\x2a\\xc1\\x62\\x1d\\xb3\\x01\\x02\\x53\\xa4\\x08\\xe8\\x00\\x03\\x18\" .\n> -\t\t\"\\x26\\x56\\x11\\xd4\\xe1\\x20\\x97\\x1b\\xe0\\xb4\\x0e\\x35\\x24\\x71\\x29\\x82\" .\n> -\t\t\"\\x99\\x30\\xb8\\x93\\x0a\\x11\\xb9\\x45\\x88\\xc1\\x8d\\xa0\\xa2\\x44\\x21\\x06\" .\n> -\t\t\"\\x27\\x41\\x82\\x40\\x85\\xc1\\x45\\x89\\x20\\x70\\x01\\x00\\xa4\\x3d\\x21\\xc5\" .\n> -\t\t\"\\x12\\x1c\\x9a\\xfe\\x00\\x00\\x00\\x00\\x49\\x45\\x4e\\x44\\xae\\x42\\x60\\x82\";\n> -}\n> -\n>  sub get_file_owner {\n>  \tmy $path = shift;\n>  \n> -- \n> 1.4.2.rc2.gf055\n> \n> -- \n> Martin Waitz\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":"24406","messageId":"eak40m$68u$1@sea.gmane.org","threadId":"5052","inReplyTo":"20060731035904.53458.qmail@web31813.mail.mud.yahoo.com","subject":"Re: [PATCH] gitweb: use out-of-line GIT logo.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-07-31T05:21:39Z","receivedAt":"2006-07-31T05:21:39Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Luben Tuikov wrote:\n\n> --- Martin Waitz <tali@admingilde.org> wrote:\n> \n>> Use the normal web server instead of the CGI to provide the git logo,\n>> just like the gitweb.css.\n> \n> NACK.  I'd really rather keep the logo (which is essential) in the\n> file itself.  This would mean one less file to worry about.\n\nI'm not sure. On the one hand this introduces yet another file which we have\nto worry about, on the other it probably help performance. Any hard\nnumbers?\n\nThe difference with gitweb.css is that you edit gitweb.css, and that\ninclused CSS can be cached; we could probably do the same trick like with\nlogo (i.e. embed it in gitweb.css, but still use \n  <link rel=\"stylesheet\" type=\"text/css\" href=\"$my_uri?a=gitweb.css\"/>\nand not\n  <style type=\"text/css\">\n  ...\n  </style>\n\nBesides, mixed language files are hard to syntax highlight correctly...\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"24410","messageId":"20060731070237.GC16364@admingilde.org","threadId":"5052","inReplyTo":"20060731035904.53458.qmail@web31813.mail.mud.yahoo.com","subject":"Re: [PATCH] gitweb: use out-of-line GIT logo.","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-07-31T07:02:37Z","receivedAt":"2006-07-31T07:02:37Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nOn Sun, Jul 30, 2006 at 08:59:04PM -0700, Luben Tuikov wrote:\n> --- Martin Waitz <tali@admingilde.org> wrote:\n> \n> > Use the normal web server instead of the CGI to provide the git logo,\n> > just like the gitweb.css.\n> \n> NACK.  I'd really rather keep the logo (which is essential) in the\n> file itself.  This would mean one less file to worry about.\n\nwe could default to use git-logo.png from kernel.org if you care about\neasy home installations.\n\nFor each serious gitweb site it should not be a problem to put the logo\ninto their image folder.\n\nAnd I really think that the .css is much more essential then the logo\n;-).  So perhaps use kernel.org for the .css by default, too?\n\n-- \nMartin Waitz\n"}]}