git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell <russellsteicke@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] git-archimport: Don't include the first line of the tla log message if it's the same as the summary.
Date: Mon, 3 Dec 2007 20:23:03 +0900	[thread overview]
Message-ID: <c1b8b6670712030323p22f4c548w9bf08f66010a7d21@mail.gmail.com> (raw)

I have a few gnu arch (tla) archives that I've been converting to git
repositories.  In many of the revisions in those archives, I have used
the ``-L msg'' flag to tla to specify the log message on the command
line.  This results in the summary field of the revision being
duplicated in the first line of the log message.  When I then use
git-archimport to make a git repo with the tla history, this line
appears twice in the git log message, which is ugly.

This patch drops the first line of the log message if it is identical
to the summary field.

---
 git-archimport.perl |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/git-archimport.perl b/git-archimport.perl
index 9a7a906..cdf7a11 100755
--- a/git-archimport.perl
+++ b/git-archimport.perl
@@ -833,6 +833,10 @@ sub parselog {
         }
     }

+    # Drop the first line of the log if it's the same as the summary.
+    if ($ps->{summary}->[0] eq $log->[0]) {
+	shift @$log;
+    }
     # drop leading empty lines from the log message
     while (@$log && $log->[0] eq '') {
	shift @$log;
--
1.5.3.7.966.g1c46-dirty


-- 
Virus found in this message.

                 reply	other threads:[~2007-12-03 11:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=c1b8b6670712030323p22f4c548w9bf08f66010a7d21@mail.gmail.com \
    --to=russellsteicke@gmail.com \
    --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).