{"thread":{"id":"9550","subject":"[PATCH] Make git-archimport log entries more consistent","startedAt":"2007-08-16T05:01:19Z","lastAt":"2007-08-16T05:01:19Z","messageCount":1,"participants":["Miles Bader"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"50848","messageId":"61lkcc2huo.fsf@fencepost.gnu.org","threadId":"9550","inReplyTo":null,"subject":"[PATCH] Make git-archimport log entries more consistent","fromName":"Miles Bader","fromEmail":"miles@gnu.org","sentAt":"2007-08-16T05:01:19Z","receivedAt":"2007-08-16T05:01:19Z","isPatch":true,"sender":{"key":"miles@gnu.org","avatar":"https://gravatar.com/avatar/01069b69593af7bff28e2f97afeb3644ae6fe2f5f56cb3a8cf34c5fb8c36efe5?d=mp&s=160"},"body":"When appending the \"git-archimport-id:\" line to the end of log entries,\ngit-archimport would use two blank lines as a separator when there was no\nbody in the arch log (only a Summary: line), and zero blank lines when there\nwas a body (making it hard to see the break between the actual log message\nand the git-archimport-id: line).\n\nThis patch makes git-archimport generate one blank line as a separator in all\ncases.\n---\n git-archimport.perl |    6 +++++-\n 1 files changed, 5 insertions(+), 1 deletions(-)\n\ndiff --git a/git-archimport.perl b/git-archimport.perl\nindex b210772..9e38ba5 100755\n--- a/git-archimport.perl\n+++ b/git-archimport.perl\n@@ -595,8 +595,12 @@ foreach my $ps (@psets) {\n     my $pid = open2(*READER, *WRITER,'git-commit-tree',$tree,@par)\n         or die $!;\n     print WRITER $ps->{summary},\"\\n\\n\";\n-    print WRITER $ps->{message},\"\\n\";\n \n+    # only print message if it's not empty, to avoid a spurious blank line;\n+    # also append an extra newline, so there's a blank line before the\n+    # following \"git-archimport-id:\" line.\n+    print WRITER $ps->{message},\"\\n\\n\" if ($ps->{message} ne \"\");\n+    \n     # make it easy to backtrack and figure out which Arch revision this was:\n     print WRITER 'git-archimport-id: ',$ps->{id},\"\\n\";\n \n-- \n1.5.3.rc3.91.g5c75-dirty\n"}]}