Subject: [PATCH] gitweb: Handle commits with empty commit messages more reasonably

From: Petr Baudis <[email-masked]>
Date: Fri, 06 Oct 2006 18:55:04 +0200

Currently those look very weird, you can't get easily at the commit view
etc. This patch makes their title '(no commit message)'.

Signed-off-by: Petr Baudis <[email-masked]>
---

 gitweb/gitweb.perl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index ea159e9..56e5231 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1115,6 +1115,9 @@ sub parse_commit {
 			last;
 		}
 	}
+	if ($co{'title'} eq "") {
+		$co{'title'} = $co{'title_short'} = '(no commit message)';
+	}
 	# remove added spaces
 	foreach my $line (@commit_lines) {
 		$line =~ s/^    //;