From: Alex Vandiver <alex@chmrr.net>
To: git@vger.kernel.org
Subject: [PATCH 4/5] git-svn: Provide a default "empty commit message" so the metadata is not the header
Date: Wed, 2 Dec 2009 14:07:53 -0500 [thread overview]
Message-ID: <1259780874-14706-5-git-send-email-alex@chmrr.net> (raw)
In-Reply-To: <1259780874-14706-1-git-send-email-alex@chmrr.net>
git-svn adds a trailing line of metadata to the commit message. If
the commit message would otherwise be empty, this can lead to
confusing display in `gitk` and `git log --oneline`. Thus, provide a
no-op "(empty commit message)" message for the first line of such
messages.
Signed-off-by: Alex Vandiver <alex@chmrr.net>
---
git-svn.perl | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 0731425..87462c9 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3111,6 +3111,7 @@ sub make_log_entry {
$log_entry{date} = parse_svn_date($log_entry{date});
parse_svk_log(\%log_entry) if $log_entry{log} =~ svk_header_regex( lenient => 1 );
+ $log_entry{log} = "(empty commit message)\n" unless $log_entry{log} =~ /\S/;
my $author = $log_entry{author} = check_author($log_entry{author});
my ($name, $email) = defined $::users{$author} ? @{$::users{$author}}
--
1.6.6.rc0.327.g032bc
next prev parent reply other threads:[~2009-12-02 19:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-02 19:07 [PATCH 0/5] git-svn: svk log message cleanup Alex Vandiver
2009-12-02 19:07 ` [PATCH 1/5] git-svn: Allow setting the committer and author date separately Alex Vandiver
2009-12-02 19:07 ` [PATCH 2/5] git-svn: Make merge metadata accessible to make_log_entry Alex Vandiver
2009-12-02 20:46 ` Alex Vandiver
2009-12-05 22:32 ` Eric Wong
2009-12-05 22:51 ` Alex Vandiver
2009-12-05 22:59 ` [spf:guess] " Sam Vilain
2009-12-05 23:10 ` Alex Vandiver
2009-12-19 22:24 ` Alex Vandiver
2009-12-02 19:07 ` [PATCH 3/5] git-svn: Strip SVK headers, optionally parsing author information Alex Vandiver
2009-12-02 19:07 ` Alex Vandiver [this message]
2009-12-02 19:07 ` [PATCH 5/5] git-svn: Correct a copy-and-pasted misleading comment Alex Vandiver
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=1259780874-14706-5-git-send-email-alex@chmrr.net \
--to=alex@chmrr.net \
--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).