Merge branch 'nd/clear-gitenv-upon-use-of-alias'
authorJunio C Hamano <gitster@pobox.com>
Fri, 4 Mar 2016 21:46:44 +0000 (13:46 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 4 Mar 2016 21:46:44 +0000 (13:46 -0800)
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

1  2 
t/t0001-init.sh
diff --combined t/t0001-init.sh
index 295aa5949a13baeb8cafff0a6782f6e49e68a075,b4f7c6b363de6a11b1b70f5c6b11482ee5e57c5b..a5b9e7a4c7e85a2f09718ee7618ae6fb48c600fe
@@@ -88,19 -88,17 +88,17 @@@ test_expect_success 'plain nested in ba
  '
  
  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
  '
  
@@@ -219,8 -217,8 +217,8 @@@ test_expect_success 'init honors globa
        x$(git config -f shared-honor-global/.git/config core.sharedRepository)
  '
  
 -test_expect_success 'init rejects insanely long --template' '
 -      test_must_fail git init --template=$(printf "x%09999dx" 1) test
 +test_expect_success 'init allows insanely long --template' '
 +      git init --template=$(printf "x%09999dx" 1) test
  '
  
  test_expect_success 'init creates a new directory' '