From: Matt McCutchen <hashproduct@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] gitweb: make "No commits" in project list gray, not bold green
Date: Thu, 28 Jun 2007 18:15:22 -0400 [thread overview]
Message-ID: <1183068922.6108.8.camel@mattlaptop2> (raw)
A missing return statement in git_get_last_activity made gitweb think
a project with no commits was in age class "age0", so the "No commits"
appeared in bold green, which was ridiculous. I added the return so
those projects get "noage" and added a block to gitweb.css to format
the "No commits" text gray.
Signed-off-by: Matt McCutchen <hashproduct@gmail.com>
---
When I visited http://repo.or.cz/ , this bug jumped out at me!
gitweb/gitweb.css | 6 ++++++
gitweb/gitweb.perl | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 7908fe3..096313b 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -281,6 +281,12 @@ table.diff_tree span.file_status.copied {
color: #70a070;
}
+/* noage: "No commits" */
+table.project_list td.noage {
+ color: #808080;
+ font-style: italic;
+}
+
/* age2: 60*60*24*2 <= age */
table.project_list td.age2, table.blame td.age2 {
font-style: italic;
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7b0e110..b251c44 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1528,6 +1528,7 @@ sub git_get_last_activity {
my $age = time - $timestamp;
return ($age, age_string($age));
}
+ return (undef, undef);
}
sub git_get_references {
--
1.5.2.2.552.gc32f
reply other threads:[~2007-06-28 22:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1183068922.6108.8.camel@mattlaptop2 \
--to=hashproduct@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).