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(-)
Show changes to git-archimport.perl +4 −1
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.