Thread (2 messages) flat view 2 messages, 1 author, 2016-06-15
STALE3710d

[PATCH] cvsimport: have default merge regex also match beginning of commit message

From: Gerrit Pape <hidden>
Date: 2016-06-15 22:44:09

The default value of @mergerx uses \W, which matches a non-word
character; this means that commit messages like "Merging FOO" are not
matched by default; using \b, which matches a word boundary, instead of
\W fixes that.

This change was suggested by Frédéric Brière through
 http://bugs.debian.org/463468

Signed-off-by: Gerrit Pape <redacted>
---
 git-cvsimport.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 5694978..9516242 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -164,7 +164,7 @@ if ($#ARGV == 0) {
 
 our @mergerx = ();
 if ($opt_m) {
-	@mergerx = ( qr/\W(?:from|of|merge|merging|merged) (\w+)/i );
+	@mergerx = ( qr/\b(?:from|of|merge|merging|merged) (\w+)/i );
 }
 if ($opt_M) {
 	push (@mergerx, qr/$opt_M/);
-- 
1.5.3.8
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help