Git.pm: Set GIT_WORK_TREE if we set GIT_DIR
commitda159c7759418bb14af655968dfa7a98bdcb8661
authorFrank Lichtenheld <flichtenheld@astaro.com>
Thu, 7 May 2009 13:41:27 +0000 (7 15:41 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 9 May 2009 15:25:55 +0000 (9 08:25 -0700)
treeb5d108f10e1c6d05988693e8c0f3c319f8c9a121
parentf01f1099f40f24fe6f7802185340a6fa3a3d4f35
Git.pm: Set GIT_WORK_TREE if we set GIT_DIR

Otherwise git will use the current directory as work tree which will
lead to unexpected results if we operate in sub directory of the
work tree.

Signed-off-by: Frank Lichtenheld <flichtenheld@astaro.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
perl/Git.pm
t/t9700-perl-git.sh
t/t9700/test.pl