[PATCH] git-archimport: Don't include the first line of the tla log message if it's the same as the summary.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux