{"thread":{"id":"6028","subject":"[PATCH] gitweb: Show project's README.html if available","startedAt":"2006-10-24T03:23:46Z","lastAt":"2006-10-24T11:30:57Z","messageCount":3,"participants":["Petr Baudis","Luben Tuikov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"29800","messageId":"20061024032346.4185.85330.stgit@rover","threadId":"6028","inReplyTo":null,"subject":"[PATCH] gitweb: Show project's README.html if available","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-10-24T03:23:46Z","receivedAt":"2006-10-24T03:23:46Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"If the repository includes a README.html file, show it in the summary page.\nThe usual \"this should be in the config file\" argument does not apply here\nsince this can be larger and having such a big string in the config file\nwould be impractical.\n\nI don't know if this is suitable upstream, but it's one of the repo.or.cz\ncustom modifications that I've thought could be interesting for others\nas well.\n\nCompared to the previous patch, this adds the '.html' extension to the\nfilename, so that it's clear it is, well, HTML.\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n gitweb/gitweb.perl |    8 ++++++++\n 1 files changed, 8 insertions(+), 0 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 3b26ec3..81adc71 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2538,6 +2538,14 @@ sub git_summary {\n \t}\n \tprint \"</table>\\n\";\n \n+\tif (-s \"$projectroot/$project/README.html\") {\n+\t\tif (open my $fd, \"$projectroot/$project/README.html\") {\n+\t\t\tprint \"<div class=\\\"title\\\">readme</div>\\n\";\n+\t\t\tprint $_ while (<$fd>);\n+\t\t\tclose $fd;\n+\t\t}\n+\t}\n+\n \topen my $fd, \"-|\", git_cmd(), \"rev-list\", \"--max-count=17\",\n \t\tgit_get_head_hash($project)\n \t\tor die_error(undef, \"Open git-rev-list failed\");\n"},{"id":"29829","messageId":"350280.74860.qm@web31804.mail.mud.yahoo.com","threadId":"6028","inReplyTo":"20061024032346.4185.85330.stgit@rover","subject":"Re: [PATCH] gitweb: Show project's README.html if available","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-10-24T08:43:08Z","receivedAt":"2006-10-24T08:43:08Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Petr Baudis <pasky@suse.cz> wrote:\n> If the repository includes a README.html file, show it in the summary page.\n> The usual \"this should be in the config file\" argument does not apply here\n> since this can be larger and having such a big string in the config file\n> would be impractical.\n> \n> I don't know if this is suitable upstream, but it's one of the repo.or.cz\n> custom modifications that I've thought could be interesting for others\n> as well.\n> \n> Compared to the previous patch, this adds the '.html' extension to the\n> filename, so that it's clear it is, well, HTML.\n> \n> Signed-off-by: Petr Baudis <pasky@suse.cz>\n> ---\n\nWhy not instead re-submit a patch implementing what was discussed\nin this thread bearing the same name:\n\nhttp://marc.theaimsgroup.com/?t=116044914900001&r=1&w=2\n\n     Luben\n\n\n> \n>  gitweb/gitweb.perl |    8 ++++++++\n>  1 files changed, 8 insertions(+), 0 deletions(-)\n> \n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index 3b26ec3..81adc71 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -2538,6 +2538,14 @@ sub git_summary {\n>  \t}\n>  \tprint \"</table>\\n\";\n>  \n> +\tif (-s \"$projectroot/$project/README.html\") {\n> +\t\tif (open my $fd, \"$projectroot/$project/README.html\") {\n> +\t\t\tprint \"<div class=\\\"title\\\">readme</div>\\n\";\n> +\t\t\tprint $_ while (<$fd>);\n> +\t\t\tclose $fd;\n> +\t\t}\n> +\t}\n> +\n>  \topen my $fd, \"-|\", git_cmd(), \"rev-list\", \"--max-count=17\",\n>  \t\tgit_get_head_hash($project)\n>  \t\tor die_error(undef, \"Open git-rev-list failed\");\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":"29848","messageId":"20061024113057.GA20017@pasky.or.cz","threadId":"6028","inReplyTo":"350280.74860.qm@web31804.mail.mud.yahoo.com","subject":"Re: [PATCH] gitweb: Show project's README.html if available","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-10-24T11:30:57Z","receivedAt":"2006-10-24T11:30:57Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, Oct 24, 2006 at 10:43:08AM CEST, I got a letter\nwhere Luben Tuikov <ltuikov@yahoo.com> said that...\n> --- Petr Baudis <pasky@suse.cz> wrote:\n> > If the repository includes a README.html file, show it in the summary page.\n> > The usual \"this should be in the config file\" argument does not apply here\n> > since this can be larger and having such a big string in the config file\n> > would be impractical.\n> > \n> > I don't know if this is suitable upstream, but it's one of the repo.or.cz\n> > custom modifications that I've thought could be interesting for others\n> > as well.\n> > \n> > Compared to the previous patch, this adds the '.html' extension to the\n> > filename, so that it's clear it is, well, HTML.\n> > \n> > Signed-off-by: Petr Baudis <pasky@suse.cz>\n> > ---\n> \n> Why not instead re-submit a patch implementing what was discussed\n> in this thread bearing the same name:\n> \n> http://marc.theaimsgroup.com/?t=116044914900001&r=1&w=2\n\nThis implements\n\n\thttp://marc.theaimsgroup.com/?l=git&m=116047939517299&w=2\n\nI see no other ideas I could take there except various naming proposals\nand perhaps using File::Copy but I'll wait until someone does a\ngitweb-wide change for the latter.\n\nI don't really care _what_ name it bears, but I'd like to have it\nincluded. :-)\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"}]}