X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=git-svnimport.perl;h=86837edbdd3392ddbc6815f948132b70c0ae3458;hb=4d569a2c422a9655390e7d33cad0bab88379f13d;hp=0dd9fab9fea81243cc4c0e80ec93fe0489b368cd;hpb=c55f3fff35ac34e6d1f0f686e27029612775e51d;p=git.git diff --git a/git-svnimport.perl b/git-svnimport.perl index 0dd9fab9..86837edb 100755 --- a/git-svnimport.perl +++ b/git-svnimport.perl @@ -30,7 +30,7 @@ $SIG{'PIPE'}="IGNORE"; $ENV{'TZ'}="UTC"; our($opt_h,$opt_o,$opt_v,$opt_u,$opt_C,$opt_i,$opt_m,$opt_M,$opt_t,$opt_T, - $opt_b,$opt_r,$opt_I,$opt_s,$opt_l,$opt_d,$opt_D); + $opt_b,$opt_r,$opt_I,$opt_A,$opt_s,$opt_l,$opt_d,$opt_D); sub usage() { print STDERR <) { + chomp; + next unless /^(\S+?)\s*=\s*(.+?)\s*<(.+)>\s*$/; + (my $user,my $name,my $email) = ($1,$2,$3); + $users{$user} = [$name,$email]; + } + close($authors); +} + select(STDERR); $|=1; select(STDOUT); @@ -485,6 +498,10 @@ sub commit { if (not defined $author) { $author_name = $author_email = "unknown"; + } elsif ($opt_A) { + die "User $author is not listed in $opt_A\n" + unless exists $users{$author}; + ($author_name,$author_email) = @{$users{$author}}; } elsif ($author =~ /^(.*?)\s+<(.*)>$/) { ($author_name, $author_email) = ($1, $2); } else {