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

[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
Previous: Alex VandiverNext: Alex Vandiver
Message 11 of 12 in “git-svn: svk log message cleanup”
  1. 0/5 git-svn: svk log message cleanupAlex Vandiver, Dec 2, 2009
  2. 1/5 git-svn: Allow setting the committer and author date separatelyAlex Vandiver, Dec 2, 2009
  3. 2/5 git-svn: Make merge metadata accessible to make_log_entryAlex Vandiver, Dec 2, 2009
  4. Alex VandiverDec 2, 2009
  5. Eric WongDec 5, 2009
  6. Alex VandiverDec 5, 2009
  7. Sam VilainDec 5, 2009
  8. Alex VandiverDec 5, 2009
  9. Alex VandiverDec 19, 2009
  10. 3/5 git-svn: Strip SVK headers, optionally parsing author informationAlex Vandiver, Dec 2, 2009
  11. 4/5 git-svn: Provide a default "empty commit message" so the metadata is not the headerAlex Vandiver, Dec 2, 2009
  12. 5/5 git-svn: Correct a copy-and-pasted misleading commentAlex Vandiver, Dec 2, 2009

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.