Skip to contentSkip to conversation

gitweb: make "No commits" in project list gray, not bold green

PATCH New Matt McCutchen 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitweb: make "No commits" in project list gray, not bold green

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.

---

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(-)
gitweb/gitweb.css +6 -0
index 7908fe3..096313b 100644
@@ -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;
gitweb/gitweb.perl +1 -0
index 7b0e110..b251c44 100755
@@ -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 {
Signature · 1 line
1.5.2.2.552.gc32f