projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fixes'
[git.git]
/
git-cvsimport.perl
diff --git
a/git-cvsimport.perl
b/git-cvsimport.perl
index
565f4f1
..
f7c3a51
100755
(executable)
--- a/
git-cvsimport.perl
+++ b/
git-cvsimport.perl
@@
-487,7
+487,10
@@
unless($pid) {
my @opt;
@opt = split(/,/,$opt_p) if defined $opt_p;
unshift @opt, '-z', $opt_z if defined $opt_z;
my @opt;
@opt = split(/,/,$opt_p) if defined $opt_p;
unshift @opt, '-z', $opt_z if defined $opt_z;
- exec("cvsps",@opt,"-u","-A","--cvs-direct",'--root',$opt_d,$cvs_tree);
+ unless ($opt_p =~ m/--no-cvs-direct/) {
+ push @opt, '--cvs-direct';
+ }
+ exec("cvsps",@opt,"-u","-A",'--root',$opt_d,$cvs_tree);
die "Could not start cvsps: $!\n";
}
die "Could not start cvsps: $!\n";
}
@@
-510,7
+513,7
@@
unless($pid) {
my $state = 0;
my $state = 0;
-my($patchset,$date,$author,$branch,$ancestor,$tag,$logmsg);
+my($patchset,$date,$author
_name,$author_email
,$branch,$ancestor,$tag,$logmsg);
my(@old,@new);
my $commit = sub {
my $pid;
my(@old,@new);
my $commit = sub {
my $pid;
@@
-591,11
+594,11
@@
my $commit = sub {
}
exec("env",
}
exec("env",
- "GIT_AUTHOR_NAME=$author",
- "GIT_AUTHOR_EMAIL=$author",
+ "GIT_AUTHOR_NAME=$author
_name
",
+ "GIT_AUTHOR_EMAIL=$author
_email
",
"GIT_AUTHOR_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
"GIT_AUTHOR_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
- "GIT_COMMITTER_NAME=$author",
- "GIT_COMMITTER_EMAIL=$author",
+ "GIT_COMMITTER_NAME=$author
_name
",
+ "GIT_COMMITTER_EMAIL=$author
_email
",
"GIT_COMMITTER_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
"git-commit-tree", $tree,@par);
die "Cannot exec git-commit-tree: $!\n";
"GIT_COMMITTER_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
"git-commit-tree", $tree,@par);
die "Cannot exec git-commit-tree: $!\n";
@@
-638,7
+641,7
@@
my $commit = sub {
print $out "object $cid\n".
"type commit\n".
"tag $xtag\n".
print $out "object $cid\n".
"type commit\n".
"tag $xtag\n".
- "tagger $author
<$author
>\n"
+ "tagger $author
_name <$author_email
>\n"
or die "Cannot create tag object $xtag: $!\n";
close($out)
or die "Cannot create tag object $xtag: $!\n";
or die "Cannot create tag object $xtag: $!\n";
close($out)
or die "Cannot create tag object $xtag: $!\n";
@@
-683,7
+686,11
@@
while(<CVS>) {
$state=3;
} elsif($state == 3 and s/^Author:\s+//) {
s/\s+$//;
$state=3;
} elsif($state == 3 and s/^Author:\s+//) {
s/\s+$//;
- $author = $_;
+ if (/^(.*?)\s+<(.*)>/) {
+ ($author_name, $author_email) = ($1, $2);
+ } else {
+ $author_name = $author_email = $_;
+ }
$state = 4;
} elsif($state == 4 and s/^Branch:\s+//) {
s/\s+$//;
$state = 4;
} elsif($state == 4 and s/^Branch:\s+//) {
s/\s+$//;