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

Re: Fix a critical bug in git-cvsexportcommit.perl

From
LLLuke Lee <luke.yx.lee@gmail.com>
Date
Sep 25, 2014, 03:15 UTC
Message-ID
<ppekl7a0.fsf@gmail.com>
In-Reply-To
<54229AFC.6080704@gmail.com>
Stefan Beller <stefanbeller@gmail.com> writes:
Show 12 quoted lines
> Please have a look at Documentation/SubmittingPatches,
> also found online at
> https://github.com/git/git/blob/master/Documentation/SubmittingPatches
>
> Specially look at section "(2) Describe your changes well."
> So the headline could be shorter and then in the body of the commit
> message you may want to be more descriptive
>
> Also look at section "(5) Sign your work"
> This is to make sure you're legally allowed to send in the patch,
> i.e. you're doing it on your own time or your employer allowed you to
> send code here to the mailing list.

I followed both (2) and (5), a new patch is generated and signed as follows. Hopefully this time it fits the criteria :). Thanks.

>From a265cffc5f5bbfb3309a5ef2b425096523c94066 Mon Sep 17 00:00:00 2001
From: "Luke Y.X. Lee" <luke.yx.lee@gmail.com>
Date: Thu, 25 Sep 2014 10:56:46 +0800
Subject: [PATCH] Fix git-cvs bug that kills non-keyword source texts
* git-cvsexportcommit.perl: the wild matching on unexpanding keywords
overkilled texts that are not CVS keywords. Limits the matching to
CVS keywords only; also prevents OO syntax that accidentally matched.
Signed-off-by: Luke Y.X. Lee <luke.yx.lee@gmail.com>
---
 git-cvsexportcommit.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
index d13f02d..8671d41 100755
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -309,7 +309,7 @@ foreach my $f (@files) {
 	while (<FILTER_IN>)
 	{
 	    my $line = $_;
-	    $line =~ s/\$([A-Z][a-z]+):[^\$]+\$/\$$1\$/g;
+	    $line =~ s/\$(Author|Date|Header|Id|Locker|Log|RCSfile|Revision|Source|State):[^:\$][^\$]*\$/\$$1\$/g;
 	    print FILTER_OUT $line;
 	}
 	close FILTER_IN;
-- 
2.1.1.304.gb913e04
Previous: Stefan Beller
Message 3 of 3 in “Fix a critical bug in git-cvsexportcommit.perl”
  1. Luke LeeSep 24, 2014
  2. Stefan BellerSep 24, 2014
  3. Luke LeeSep 25, 2014

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.