cvsimport: set up commit environment in perl instead of using env
authorJeff King <peff@peff.net>
Tue, 23 May 2006 20:59:44 +0000 (16:59 -0400)
committerJunio C Hamano <junkio@cox.net>
Tue, 23 May 2006 23:43:12 +0000 (16:43 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-cvsimport.perl

index 60fc86a5beddd7ecf27256b3dee113c80eb8ecb8..af331d9c4316a56db7bd4b3cfb4f1d5d8d5f6de5 100755 (executable)
@@ -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