[PATCH 4/5] git-svn: Provide a default "empty commit message" so the metadata is not the header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]