@matheusbsbs / matheus-bagliano / commits / 62bf0d9629
Fork 0

cvsimport: set up commit environment in perl instead of using env

Signed-off-by: Junio C Hamano <junkio@cox.net>

Jeff King committed May 23, 2006 at 16:59 UTC 62bf0d962963794e9fbcdfdd43419b060d5d245f
1 file changed +6 -7
git-cvsimport.perl
+6 -7
@@ -618,14 +618,13 @@ sub commit {
618 }
619
620 my $commit_date = strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date));
621 + $ENV{GIT_AUTHOR_NAME} = $author_name;
622 + $ENV{GIT_AUTHOR_EMAIL} = $author_email;
623 + $ENV{GIT_AUTHOR_DATE} = $commit_date;
624 + $ENV{GIT_COMMITTER_NAME} = $author_name;
625 + $ENV{GIT_COMMITTER_EMAIL} = $author_email;
626 + $ENV{GIT_COMMITTER_DATE} = $commit_date;
627 my $pid = open2(my $commit_read, my $commit_write,
622 - 'env',
623 - "GIT_AUTHOR_NAME=$author_name",
624 - "GIT_AUTHOR_EMAIL=$author_email",
625 - "GIT_AUTHOR_DATE=$commit_date",
626 - "GIT_COMMITTER_NAME=$author_name",
627 - "GIT_COMMITTER_EMAIL=$author_email",
628 - "GIT_COMMITTER_DATE=$commit_date",
628 'git-commit-tree', $tree, @commit_args);
629
630 # compatibility with git2cvs