git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: Remove commit title from comitdiff_plain body
@ 2008-03-19 22:28 Jakub Narebski
  2008-03-19 22:35 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Narebski @ 2008-03-19 22:28 UTC (permalink / raw)
  To: git



Remove commit title (first line of commit message) from the "body" of
commitdiff_plain view: it is present there already in format-patch
like Subject: header.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---

 gitweb/gitweb.perl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index ec73cb1..6e3ab85 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -5122,8 +5122,11 @@ sub git_commitdiff {
 		print "Subject: " . to_utf8($co{'title'}) . "\n";
 
 		print "X-Git-Tag: $tagname\n" if $tagname;
-		print "X-Git-Url: " . $cgi->self_url() . "\n\n";
+		print "X-Git-Url: " . $cgi->self_url() . "\n";
 
+		# remove title, i.e. first line of log
+		shift @{$co{'comment'}};
+		# leading empty lines would separate headers from body
 		foreach my $line (@{$co{'comment'}}) {
 			print to_utf8($line) . "\n";
 		}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-19 22:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 22:28 [PATCH] gitweb: Remove commit title from comitdiff_plain body Jakub Narebski
2008-03-19 22:35 ` Junio C Hamano

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).