Skip to content

Commit 28ab768

Browse files
committed
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
2 parents 3978cd0 + f3858f8 commit 28ab768

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

t/t0001-init.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,17 @@ test_expect_success 'plain nested in bare through aliased command' '
8888
'
8989

9090
test_expect_success 'No extra GIT_* on alias scripts' '
91-
(
92-
env | sed -ne "/^GIT_/s/=.*//p" &&
93-
echo GIT_PREFIX && # setup.c
94-
echo GIT_TEXTDOMAINDIR # wrapper-for-bin.sh
95-
) | sort | uniq >expected &&
96-
cat <<-\EOF >script &&
97-
#!/bin/sh
98-
env | sed -ne "/^GIT_/s/=.*//p" | sort >actual
99-
exit 0
91+
write_script script <<-\EOF &&
92+
env |
93+
sed -n \
94+
-e "/^GIT_PREFIX=/d" \
95+
-e "/^GIT_TEXTDOMAINDIR=/d" \
96+
-e "/^GIT_/s/=.*//p" |
97+
sort
10098
EOF
101-
chmod 755 script &&
99+
./script >expected &&
102100
git config alias.script \!./script &&
103-
( mkdir sub && cd sub && git script ) &&
101+
( mkdir sub && cd sub && git script >../actual ) &&
104102
test_cmp expected actual
105103
'
106104

0 commit comments

Comments
 (0)