X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-cvsimport.perl;h=76f6246a31b86dd54ca0556f76a8511d73be8ec7;hb=7a97de4e19757b5576f32ce67d90cb792dbb893b;hp=60fc86a5beddd7ecf27256b3dee113c80eb8ecb8;hpb=61efa5e300386978dd440716260c94e951a493b4;p=git.git diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 60fc86a5..76f6246a 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -23,7 +23,7 @@ use File::Basename qw(basename dirname); use Time::Local; use IO::Socket; use IO::Pipe; -use POSIX qw(strftime dup2 :errno_h); +use POSIX qw(strftime dup2 ENOENT); use IPC::Open2; $SIG{'PIPE'}="IGNORE"; @@ -618,14 +618,13 @@ sub commit { } my $commit_date = strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)); + $ENV{GIT_AUTHOR_NAME} = $author_name; + $ENV{GIT_AUTHOR_EMAIL} = $author_email; + $ENV{GIT_AUTHOR_DATE} = $commit_date; + $ENV{GIT_COMMITTER_NAME} = $author_name; + $ENV{GIT_COMMITTER_EMAIL} = $author_email; + $ENV{GIT_COMMITTER_DATE} = $commit_date; my $pid = open2(my $commit_read, my $commit_write, - 'env', - "GIT_AUTHOR_NAME=$author_name", - "GIT_AUTHOR_EMAIL=$author_email", - "GIT_AUTHOR_DATE=$commit_date", - "GIT_COMMITTER_NAME=$author_name", - "GIT_COMMITTER_EMAIL=$author_email", - "GIT_COMMITTER_DATE=$commit_date", 'git-commit-tree', $tree, @commit_args); # compatibility with git2cvs