diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-13 13:37:20 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-13 13:37:20 (GMT) |
commit | 6c268fdda9dcc421e2bee1ce76496d3e9f96397f (patch) | |
tree | 2181f2032e963eef5f5d95968db797435cfefd83 /t | |
parent | fbfdc07511283a111192e32970bee909016b47d2 (diff) | |
parent | 0e218f91c299b0bffa281d3449884a824819a201 (diff) | |
download | git-6c268fdda9dcc421e2bee1ce76496d3e9f96397f.zip git-6c268fdda9dcc421e2bee1ce76496d3e9f96397f.tar.gz git-6c268fdda9dcc421e2bee1ce76496d3e9f96397f.tar.bz2 |
Merge branch 'js/mingw-perl5lib'
Windows fix.
* js/mingw-perl5lib:
mingw: unset PERL5LIB by default
config: move Windows-specific config settings into compat/mingw.c
config: allow for platform-specific core.* config settings
config: rename `dummy` parameter to `cb` in git_default_config()
Diffstat (limited to 't')
-rwxr-xr-x | t/t0029-core-unsetenvvars.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/t/t0029-core-unsetenvvars.sh b/t/t0029-core-unsetenvvars.sh new file mode 100755 index 0000000..24ce46a --- /dev/null +++ b/t/t0029-core-unsetenvvars.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +test_description='test the Windows-only core.unsetenvvars setting' + +. ./test-lib.sh + +if ! test_have_prereq MINGW +then + skip_all='skipping Windows-specific tests' + test_done +fi + +test_expect_success 'setup' ' + mkdir -p "$TRASH_DIRECTORY/.git/hooks" && + write_script "$TRASH_DIRECTORY/.git/hooks/pre-commit" <<-\EOF + echo $HOBBES >&2 + EOF +' + +test_expect_success 'core.unsetenvvars works' ' + HOBBES=Calvin && + export HOBBES && + git commit --allow-empty -m with 2>err && + grep Calvin err && + git -c core.unsetenvvars=FINDUS,HOBBES,CALVIN \ + commit --allow-empty -m without 2>err && + ! grep Calvin err +' + +test_done |