Skip to content

Commit

Permalink
Merge branch 'nd/clear-gitenv-upon-use-of-alias'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junio C Hamano committed Mar 4, 2016
2 parents 3978cd0 + f3858f8 commit 28ab768
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions t/t0001-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'

Expand Down

0 comments on commit 28ab768

Please sign in to comment.