Git development
 help / color / mirror / Atom feed
From: Urs Thuermann <urs@isnogud.escape.de>
To: git@vger.kernel.org
Cc: Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: Migration from CVS to Git looses merges
Date: 25 Jun 2017 11:30:38 +0200	[thread overview]
Message-ID: <ygf7f00tnwh.fsf@tehran.isnogud.escape.de> (raw)
In-Reply-To: <87a84web83.fsf@linux-m68k.org>; from Andreas Schwab on Sun, 25 Jun 2017 10:13:32 +0200

Andreas Schwab <schwab@linux-m68k.org> writes:

> Merges are recognized purely by matching the commit message, and the
> regexp must capture the branch name in the first subexpr.  The -m option
> enables some default regexps but won't match your example.  You can use
> -M 'Merge branch ([-\w]+)' to match it.

Thanks, I tried again and now it works.  I misread the man page and
also tried enclosing the regexp in //, also tried to escape the
parentheses (as in BRE), and I thought I also tried 'Merge branch (.*)'.
Obviously, I missed that one since it now works.

BTW, I now looked up the regexes for -m in git-cvsimport.perl.  Should
probably in the man page.

I also suggest the following patch, so that -m would work with my not
so uncommon merge commit message:

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 1e4e65a..1f8044b 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -207,7 +207,7 @@ if ($#ARGV == 0) {
 
 our @mergerx = ();
 if ($opt_m) {
-	@mergerx = ( qr/\b(?:from|of|merge|merging|merged) ([-\w]+)/i );
+	@mergerx = ( qr/\b(?:from|of|merge|merging|merged) (?:branch )?([-\w]+)/i );
 }
 if (@opt_M) {
 	push (@mergerx, map { qr/$_/ } @opt_M);


urs

      reply	other threads:[~2017-06-25  9:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-25  7:12 Migration from CVS to Git looses merges Urs Thuermann
2017-06-25  8:13 ` Andreas Schwab
2017-06-25  9:30   ` Urs Thuermann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ygf7f00tnwh.fsf@tehran.isnogud.escape.de \
    --to=urs@isnogud.escape.de \
    --cc=git@vger.kernel.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox