From: Miles Bader <miles@gnu.org>
To: git@vger.kernel.org
Subject: [PATCH] Make git-archimport log entries more consistent
Date: Thu, 16 Aug 2007 01:01:19 -0400 [thread overview]
Message-ID: <61lkcc2huo.fsf@fencepost.gnu.org> (raw)
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.
---
git-archimport.perl | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/git-archimport.perl b/git-archimport.perl
index b210772..9e38ba5 100755
--- a/git-archimport.perl
+++ b/git-archimport.perl
@@ -595,8 +595,12 @@ 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";
--
1.5.3.rc3.91.g5c75-dirty
next reply other threads:[~2007-08-16 4:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 5:01 Miles Bader [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-08-30 1:56 [PATCH] Make git-archimport log entries more consistent Miles Bader
2007-08-30 3:14 ` Junio C Hamano
2007-08-30 3:19 ` Miles Bader
2007-08-30 4:10 ` Junio C Hamano
2007-08-30 7:47 ` David Kastrup
2007-08-30 21:46 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61lkcc2huo.fsf@fencepost.gnu.org \
--to=miles@gnu.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).