{"thread":{"id":"11120","subject":"[PATCH] git-archimport: Don't include the first line of the tla log message if it's the same as the summary.","startedAt":"2007-12-03T11:23:03Z","lastAt":"2007-12-03T11:23:03Z","messageCount":1,"participants":["Russell"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"61773","messageId":"c1b8b6670712030323p22f4c548w9bf08f66010a7d21@mail.gmail.com","threadId":"11120","inReplyTo":null,"subject":"[PATCH] git-archimport: Don't include the first line of the tla log message if it's the same as the summary.","fromName":"Russell","fromEmail":"russellsteicke@gmail.com","sentAt":"2007-12-03T11:23:03Z","receivedAt":"2007-12-03T11:23:03Z","isPatch":true,"sender":{"key":"russellsteicke@gmail.com","avatar":null},"body":"I have a few gnu arch (tla) archives that I've been converting to git\nrepositories.  In many of the revisions in those archives, I have used\nthe ``-L msg'' flag to tla to specify the log message on the command\nline.  This results in the summary field of the revision being\nduplicated in the first line of the log message.  When I then use\ngit-archimport to make a git repo with the tla history, this line\nappears twice in the git log message, which is ugly.\n\nThis patch drops the first line of the log message if it is identical\nto the summary field.\n\n---\n git-archimport.perl |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/git-archimport.perl b/git-archimport.perl\nindex 9a7a906..cdf7a11 100755\n--- a/git-archimport.perl\n+++ b/git-archimport.perl\n@@ -833,6 +833,10 @@ sub parselog {\n         }\n     }\n\n+    # Drop the first line of the log if it's the same as the summary.\n+    if ($ps->{summary}->[0] eq $log->[0]) {\n+\tshift @$log;\n+    }\n     # drop leading empty lines from the log message\n     while (@$log && $log->[0] eq '') {\n\tshift @$log;\n--\n1.5.3.7.966.g1c46-dirty\n\n\n-- \nVirus found in this message.\n"}]}