git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
RRussell <russellsteicke@gmail.com>
Date
Dec 3, 2007, 11:23 UTC
Message-ID
<c1b8b6670712030323p22f4c548w9bf08f66010a7d21@mail.gmail.com>

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.
Message 1 of 1 in “git-archimport: Don't include the first line of the tla log message if it's the same as the summary.”
  1. git-archimport: Don't include the first line of the tla log message if it's the same as the summary.Russell, Dec 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.