Skip to content

Commit

Permalink
cvsimport: set up commit environment in perl instead of using env
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Jeff King authored and Junio C Hamano committed May 23, 2006
1 parent 61efa5e commit 62bf0d9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions git-cvsimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62bf0d9

Please sign in to comment.