summaryrefslogtreecommitdiff
path: root/git-archimport.perl
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-08-30 01:56:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-08-31 02:22:02 (GMT)
commit608403d7a522adb3f8c0244956a332ed1b286668 (patch)
treefa8e5d293ad43c511395e064d75464dc8b659d07 /git-archimport.perl
parent9e2d57a04ac42c7450e78668ee7037b35d56f7c3 (diff)
downloadgit-608403d7a522adb3f8c0244956a332ed1b286668.zip
git-608403d7a522adb3f8c0244956a332ed1b286668.tar.gz
git-608403d7a522adb3f8c0244956a332ed1b286668.tar.bz2
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>
Diffstat (limited to 'git-archimport.perl')
-rwxr-xr-xgit-archimport.perl6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-archimport.perl b/git-archimport.perl
index b210772..9a7a906 100755
--- a/git-archimport.perl
+++ b/git-archimport.perl
@@ -595,7 +595,11 @@ foreach my $ps (@psets) {
my $pid = open2(*READER, *WRITER,'git-commit-tree',$tree,@par)
or die $!;
print WRITER $ps->{summary},"\n\n";
- print WRITER $ps->{message},"\n";
+
+ # only print message if it's not empty, to avoid a spurious blank line;
+ # also append an extra newline, so there's a blank line before the
+ # following "git-archimport-id:" line.
+ print WRITER $ps->{message},"\n\n" if ($ps->{message} ne "");
# make it easy to backtrack and figure out which Arch revision this was:
print WRITER 'git-archimport-id: ',$ps->{id},"\n";