Skip to content

Commit a786091

Browse files
author
Eric Wong
committed
t9124: clean up chdir usage
Spawn subshells when running things in subdirectories instead of chdir-ing to the path of an undefined variable, which is confusing. Signed-off-by: Eric Wong <normalperson@yhbt.net>
1 parent 4457d4f commit a786091

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

t/t9124-git-svn-dcommit-auto-props.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@ test_expect_success 'initialize git-svn' '
2929
'
3030

3131
test_expect_success 'enable auto-props config' '
32-
cd "$gittestrepo" &&
3332
mkdir user &&
3433
generate_auto_props yes >user/config
3534
'
3635

3736
test_expect_success 'add files matching auto-props' '
38-
cd "$gittestrepo" &&
3937
echo "#!$SHELL_PATH" >exec1.sh &&
4038
chmod +x exec1.sh &&
4139
echo "hello" >hello.txt &&
@@ -46,12 +44,10 @@ test_expect_success 'add files matching auto-props' '
4644
'
4745

4846
test_expect_success 'disable auto-props config' '
49-
cd "$gittestrepo" &&
5047
generate_auto_props no >user/config
5148
'
5249

5350
test_expect_success 'add files matching disabled auto-props' '
54-
cd "$gittestrepo" &&
5551
echo "#$SHELL_PATH" >exec2.sh &&
5652
chmod +x exec2.sh &&
5753
echo "world" >world.txt &&
@@ -62,6 +58,7 @@ test_expect_success 'add files matching disabled auto-props' '
6258
'
6359

6460
test_expect_success 'check resulting svn repository' '
61+
(
6562
mkdir work &&
6663
cd work &&
6764
svn co "$svnrepo" &&
@@ -81,6 +78,7 @@ test_expect_success 'check resulting svn repository' '
8178
test "x$(svn propget svn:mime-type world.txt)" = "x" &&
8279
test "x$(svn propget svn:eol-style world.txt)" = "x" &&
8380
test "x$(svn propget svn:mime-type zot)" = "x"
81+
)
8482
'
8583

8684
test_done

0 commit comments

Comments
 (0)