Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Pass CVSps generated A U Thor <author@domain.xz> intact.
author
Junio C Hamano
<junkio@cox.net>
Fri, 30 Sep 2005 08:48:57 +0000
(
01:48
-0700)
committer
Junio C Hamano
<junkio@cox.net>
Sun, 2 Oct 2005 06:15:23 +0000
(23:15 -0700)
Alexey Nezhdanov updated CVSps to generate author-name and
author-email information in its output.
If the input looks like it has that already properly formatted,
use that without our own munging.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-cvsimport.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
37f15d5
)
diff --git
a/git-cvsimport.perl
b/git-cvsimport.perl
index 565f4f1b32c8b9d96df3602ab2d729cf3529836a..f35c0d045b3db937e8bf447063c81e869b800f7e 100755
(executable)
--- a/
git-cvsimport.perl
+++ b/
git-cvsimport.perl
@@
-510,7
+510,7
@@
($$)
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
+591,11
@@
($$)
}
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
+638,7
@@
($$)
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
+683,11
@@
($$)
$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+$//;