From: Luben Tuikov <ltuikov@yahoo•com>
To: Petr Baudis <pasky@suse•cz>, Junio C Hamano <junkio@cox•net>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] gitweb: Show project's README.html if available
Date: Tue, 24 Oct 2006 01:43:08 -0700 (PDT) [thread overview]
Message-ID: <350280.74860.qm@web31804.mail.mud.yahoo.com> (raw)
In-Reply-To: <20061024032346.4185.85330.stgit@rover>
--- Petr Baudis <pasky@suse•cz> wrote:
> If the repository includes a README.html file, show it in the summary page.
> The usual "this should be in the config file" argument does not apply here
> since this can be larger and having such a big string in the config file
> would be impractical.
>
> I don't know if this is suitable upstream, but it's one of the repo.or.cz
> custom modifications that I've thought could be interesting for others
> as well.
>
> Compared to the previous patch, this adds the '.html' extension to the
> filename, so that it's clear it is, well, HTML.
>
> Signed-off-by: Petr Baudis <pasky@suse•cz>
> ---
Why not instead re-submit a patch implementing what was discussed
in this thread bearing the same name:
http://marc.theaimsgroup.com/?t=116044914900001&r=1&w=2
Luben
>
> gitweb/gitweb.perl | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 3b26ec3..81adc71 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -2538,6 +2538,14 @@ sub git_summary {
> }
> print "</table>\n";
>
> + if (-s "$projectroot/$project/README.html") {
> + if (open my $fd, "$projectroot/$project/README.html") {
> + print "<div class=\"title\">readme</div>\n";
> + print $_ while (<$fd>);
> + close $fd;
> + }
> + }
> +
> open my $fd, "-|", git_cmd(), "rev-list", "--max-count=17",
> git_get_head_hash($project)
> or die_error(undef, "Open git-rev-list failed");
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger•kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2006-10-24 8:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-24 3:23 [PATCH] gitweb: Show project's README.html if available Petr Baudis
2006-10-24 8:43 ` Luben Tuikov [this message]
2006-10-24 11:30 ` Petr Baudis
2006-10-24 19:09 ` Luben Tuikov
2006-10-24 19:19 ` Petr Baudis
2006-10-24 19:41 ` Luben Tuikov
2006-10-24 19:50 ` Petr Baudis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=350280.74860.qm@web31804.mail.mud.yahoo.com \
--to=ltuikov@yahoo$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=junkio@cox$(echo .)net \
--cc=pasky@suse$(echo .)cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox