Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Thu, 13 Mar 2008 06:47:31 +0000 (23:47 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Mar 2008 06:47:31 +0000 (23:47 -0700)
* maint:
git-cvsimport: fix merging with remote parent branch
gitweb: Fix bug in href(..., -replay=>1) when using 'pathinfo' form

1  2 
git-cvsimport.perl
diff --combined git-cvsimport.perl
index 47f116f37ee1030ac0cab1f91feec04d673d94bd,8093996e257e510da9060a3d00661170c59437b6..95c5eec51ecc6ab6f142cef51eb4bd3b5842debb
@@@ -15,7 -15,7 +15,7 @@@
  
  use strict;
  use warnings;
 -use Getopt::Std;
 +use Getopt::Long;
  use File::Spec;
  use File::Temp qw(tempfile tmpnam);
  use File::Path qw(mkpath);
@@@ -29,7 -29,7 +29,7 @@@ use IPC::Open2
  $SIG{'PIPE'}="IGNORE";
  $ENV{'TZ'}="UTC";
  
 -our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,$opt_M,$opt_A,$opt_S,$opt_L, $opt_a, $opt_r);
 +our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,@opt_M,$opt_A,$opt_S,$opt_L, $opt_a, $opt_r);
  my (%conv_author_name, %conv_author_email);
  
  sub usage(;$) {
@@@ -112,12 -112,7 +112,12 @@@ sub read_repo_config 
  
  my $opts = "haivmkuo:d:p:r:C:z:s:M:P:A:S:L:";
  read_repo_config($opts);
 -getopts($opts) or usage();
 +Getopt::Long::Configure( 'no_ignore_case', 'bundling' );
 +
 +# turn the Getopt::Std specification in a Getopt::Long one,
 +# with support for multiple -M options
 +GetOptions( map { s/:/=s/; /M/ ? "$_\@" : $_ } split( /(?!:)/, $opts ) )
 +    or usage();
  usage if $opt_h;
  
  if (@ARGV == 0) {
@@@ -169,10 -164,10 +169,10 @@@ 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) ([-\w]+)/i );
  }
 -if ($opt_M) {
 -      push (@mergerx, qr/$opt_M/);
 +if (@opt_M) {
 +      push (@mergerx, map { qr/$_/ } @opt_M);
  }
  
  # Remember UTC of our starting time
@@@ -735,7 -730,7 +735,7 @@@ sub commit 
                next unless $logmsg =~ $rx && $1;
                my $mparent = $1 eq 'HEAD' ? $opt_o : $1;
                if (my $sha1 = get_headref("$remote/$mparent")) {
-                       push @commit_args, '-p', $mparent;
+                       push @commit_args, '-p', "$remote/$mparent";
                        print "Merge parent branch: $mparent\n" if $opt_v;
                }
        }