[PATCH 4/5] git-svn: Provide a default "empty commit message" so the metadata is not the header
- From
Alex Vandiver <alex@chmrr.net>
- Date
- Dec 2, 2009, 19:07 UTC
- Message-ID
- <1259780874-14706-5-git-send-email-alex@chmrr.net>
- 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