git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-archimport: Don't include the first line of the tla log message if it's the same as the summary.
@ 2007-12-03 11:23 Russell
  0 siblings, 0 replies; only message in thread
From: Russell @ 2007-12-03 11:23 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-03 11:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-03 11:23 [PATCH] git-archimport: Don't include the first line of the tla log message if it's the same as the summary Russell

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).