summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh32
1 files changed, 14 insertions, 18 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 1ce3b32fca..a62699d6c7 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -499,24 +499,20 @@ EDITOR=:
# /usr/xpg4/bin/sh and /bin/ksh to bail out. So keep the unsets
# deriving from the command substitution clustered with the other
# ones.
-unset VISUAL EMAIL LANGUAGE $("$PERL_PATH" -e '
- my @env = keys %ENV;
- my $ok = join("|", qw(
- TRACE
- DEBUG
- TEST
- .*_TEST
- PROVE
- VALGRIND
- UNZIP
- PERF_
- CURL_VERBOSE
- TRACE_CURL
- BUILD_DIR
- ));
- my @vars = grep(/^GIT_/ && !/^GIT_($ok)/o, @env);
- print join("\n", @vars);
-')
+unset VISUAL EMAIL LANGUAGE $(env | sed -n \
+ -e '/^GIT_TRACE/d' \
+ -e '/^GIT_DEBUG/d' \
+ -e '/^GIT_TEST/d' \
+ -e '/^GIT_.*_TEST/d' \
+ -e '/^GIT_PROVE/d' \
+ -e '/^GIT_VALGRIND/d' \
+ -e '/^GIT_UNZIP/d' \
+ -e '/^GIT_PERF_/d' \
+ -e '/^GIT_CURL_VERBOSE/d' \
+ -e '/^GIT_TRACE_CURL/d' \
+ -e '/^GIT_BUILD_DIR/d' \
+ -e 's/^\(GIT_[^=]*\)=.*/\1/p'
+)
unset XDG_CACHE_HOME
unset XDG_CONFIG_HOME
unset GITPERLLIB