From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] gitweb: Remove commit title from comitdiff_plain body
Date: Wed, 19 Mar 2008 23:28:58 +0100 [thread overview]
Message-ID: <20080319222858.733.79714.stgit@localhost.localdomain> (raw)
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 reply other threads:[~2008-03-19 22:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-19 22:28 Jakub Narebski [this message]
2008-03-19 22:35 ` [PATCH] gitweb: Remove commit title from comitdiff_plain body Junio C Hamano
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=20080319222858.733.79714.stgit@localhost.localdomain \
--to=jnareb@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.