Skip to content

Commit

Permalink
Make git-archimport log entries more consistent
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miles Bader authored and Junio C Hamano committed Aug 31, 2007
1 parent 9e2d57a commit 608403d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion git-archimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,11 @@ sub process_patchset_fast {
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";
Expand Down

0 comments on commit 608403d

Please sign in to comment.