diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-03-04 13:46:44 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-04 13:46:44 -0800 |
commit | 28ab768afafd0d601db444c1d6253fa1b820b55c (patch) | |
tree | 6764e18e44f86edb265c7dc6da0e78e2d14731d7 /t/t0001-init.sh | |
parent | 3978cd06ffcb62ed94e3b3efcc086f8ed623680f (diff) | |
parent | f3858f8edcb91054cdc0b6f086ec34109582f67f (diff) | |
download | git-28ab768afafd0d601db444c1d6253fa1b820b55c.tar.gz |
Merge branch 'nd/clear-gitenv-upon-use-of-alias'
Hotfix for a test breakage made between 2.7 and 'master'.
* nd/clear-gitenv-upon-use-of-alias:
t0001: fix GIT_* environment variable check under --valgrind
Diffstat (limited to 't/t0001-init.sh')
-rwxr-xr-x | t/t0001-init.sh | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 295aa5949a..a5b9e7a4c7 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -88,19 +88,17 @@ test_expect_success 'plain nested in bare through aliased command' ' ' test_expect_success 'No extra GIT_* on alias scripts' ' - ( - env | sed -ne "/^GIT_/s/=.*//p" && - echo GIT_PREFIX && # setup.c - echo GIT_TEXTDOMAINDIR # wrapper-for-bin.sh - ) | sort | uniq >expected && - cat <<-\EOF >script && - #!/bin/sh - env | sed -ne "/^GIT_/s/=.*//p" | sort >actual - exit 0 + write_script script <<-\EOF && + env | + sed -n \ + -e "/^GIT_PREFIX=/d" \ + -e "/^GIT_TEXTDOMAINDIR=/d" \ + -e "/^GIT_/s/=.*//p" | + sort EOF - chmod 755 script && + ./script >expected && git config alias.script \!./script && - ( mkdir sub && cd sub && git script ) && + ( mkdir sub && cd sub && git script >../actual ) && test_cmp expected actual ' |