git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: Remove commit title from comitdiff_plain body

From
Jakub Narebski <jnareb@gmail.com>
Date
Mar 19, 2008, 22:28 UTC
Message-ID
<20080319222858.733.79714.stgit@localhost.localdomain>

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";
 		}
Next: Junio C Hamano
Message 1 of 2 in “gitweb: Remove commit title from comitdiff_plain body”
  1. gitweb: Remove commit title from comitdiff_plain bodyJakub Narebski, Mar 19, 2008
  2. Junio C HamanoMar 19, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.