git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ed Swarthout <Ed.Swarthout@freescale.com>
To: git@vger.kernel.org
Cc: Ed Swarthout <Ed.Swarthout@freescale.com>
Subject: [PATCH] gitweb: Fix uninitialized value when commit message is missing.
Date: Thu, 15 Mar 2007 23:55:09 -0500	[thread overview]
Message-ID: <11740209091385-git-send-email-Ed.Swarthout@freescale.com> (raw)


Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 27b5970..4771689 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1346,7 +1346,7 @@ sub parse_commit_text {
 			last;
 		}
 	}
-	if ($co{'title'} eq "") {
+	if (!defined($co{'title'}) || $co{'title'} eq "") {
 		$co{'title'} = $co{'title_short'} = '(no commit message)';
 	}
 	# remove added spaces
-- 
1.5.0.4.403.g4ee1

                 reply	other threads:[~2007-03-16  4:56 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=11740209091385-git-send-email-Ed.Swarthout@freescale.com \
    --to=ed.swarthout@freescale.com \
    --cc=git@vger.kernel.org \
    /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).