diff --git a/perl/Git.pm b/perl/Git.pm
index 291ff5b53c1883ee8fce67fbb7e2b32393ef0800..4313db75b5a1de3085e45b949c267ea4be9fe5fe 100644 (file)
--- a/perl/Git.pm
+++ b/perl/Git.pm
my ($self, @args) = @_;
if ($self) {
$self->repo_path() and $ENV{'GIT_DIR'} = $self->repo_path();
+ $self->repo_path() and $self->wc_path()
+ and $ENV{'GIT_WORK_TREE'} = $self->wc_path();
$self->wc_path() and chdir($self->wc_path());
$self->wc_subdir() and chdir($self->wc_subdir());
}