@matheusbsbs / matheus-bagliano / commits / 608403d7a5
Fork 0

Make git-archimport log entries more consistent

When appending the "git-archimport-id:" line to the end of log entries, git-archimport would use two blank lines as a separator when there was no body in the arch log (only a Summary: line), and zero blank lines when there was a body (making it hard to see the break between the actual log message and the git-archimport-id: line). This patch makes git-archimport generate one blank line as a separator in all cases. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Miles Bader committed Aug 29, 2007 at 21:56 UTC 608403d7a522adb3f8c0244956a332ed1b286668
1 file changed +5 -1
git-archimport.perl
+5 -1
@@ -595,7 +595,11 @@ foreach my $ps (@psets) {
595 my $pid = open2(*READER, *WRITER,'git-commit-tree',$tree,@par)
596 or die $!;
597 print WRITER $ps->{summary},"\n\n";
598 - print WRITER $ps->{message},"\n";
598 +
599 + # only print message if it's not empty, to avoid a spurious blank line;
600 + # also append an extra newline, so there's a blank line before the
601 + # following "git-archimport-id:" line.
602 + print WRITER $ps->{message},"\n\n" if ($ps->{message} ne "");
603
604 # make it easy to backtrack and figure out which Arch revision this was:
605 print WRITER 'git-archimport-id: ',$ps->{id},"\n";