]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-cvsimport.perl
Merge branch 'pb/prepare-commit-msg'
[git.git] / git-cvsimport.perl
index 1fa9a2237637f8b463355f2fca9c1b590fbe0e63..9516242338d95687b4354a6d21692cbd10547899 100755 (executable)
@@ -88,7 +88,7 @@ sub write_author_info($) {
        close ($f);
 }
 
-# convert getopts specs for use by git-repo-config
+# convert getopts specs for use by git config
 sub read_repo_config {
     # Split the string between characters, unless there is a ':'
     # So "abc:de" becomes ["a", "b", "c:", "d", "e"]
@@ -96,7 +96,7 @@ sub read_repo_config {
        foreach my $o (@opts) {
                my $key = $o;
                $key =~ s/://g;
-               my $arg = 'git-repo-config';
+               my $arg = 'git config';
                $arg .= ' --bool' if ($o !~ /:$/);
 
         chomp(my $tmp = `$arg --get cvsimport.$key`);
@@ -116,7 +116,7 @@ getopts($opts) or usage();
 usage if $opt_h;
 
 if (@ARGV == 0) {
-               chomp(my $module = `git-repo-config --get cvsimport.module`);
+               chomp(my $module = `git config --get cvsimport.module`);
                push(@ARGV, $module) if $? == 0;
 }
 @ARGV <= 1 or usage("You can't specify more than one CVS module");
@@ -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/);
@@ -632,6 +632,7 @@ unless ($opt_P) {
            print $cvspsfh $_;
        }
        close CVSPS;
+       $? == 0 or die "git-cvsimport: fatal: cvsps reported error\n";
        close $cvspsfh;
 } else {
        $cvspsfile = $opt_P;