From 48b6e8cd213cbd9310fd7543106eac3ca86cc560 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 19 Jun 2013 11:29:57 +0200 Subject: [PATCH] Always clear git env vars --- src/Composer/Util/Git.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Composer/Util/Git.php b/src/Composer/Util/Git.php index cad774d94..3200688a9 100644 --- a/src/Composer/Util/Git.php +++ b/src/Composer/Util/Git.php @@ -29,11 +29,7 @@ class Git putenv('GIT_ASKPASS=echo'); // clean up rogue git env vars in case this is running in a git hook - if (getenv('GIT_DIR')) { - putenv('GIT_DIR'); - } - if (getenv('GIT_WORK_TREE')) { - putenv('GIT_WORK_TREE'); - } + putenv('GIT_DIR'); + putenv('GIT_WORK_TREE'); } }