Skip to content

Commit fbd3199

Browse files
davvidgitster
authored andcommitted
t7900-subtree.sh: fix quoting and broken && chains
Allow whitespace in arguments to subtree_test_create_repo. Add missing && chains. Signed-off-by: David Aguilar <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 05219a1 commit fbd3199

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

contrib/subtree/t/t7900-subtree.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ export TEST_DIRECTORY
1616

1717
subtree_test_create_repo()
1818
{
19-
test_create_repo "$1"
19+
test_create_repo "$1" &&
2020
(
21-
cd $1
21+
cd "$1" &&
2222
git config log.date relative
2323
)
2424
}
2525

2626
create()
2727
{
28-
echo "$1" >"$1"
28+
echo "$1" >"$1" &&
2929
git add "$1"
3030
}
3131

@@ -71,12 +71,12 @@ join_commits()
7171
}
7272

7373
test_create_commit() (
74-
repo=$1
75-
commit=$2
76-
cd "$repo"
77-
mkdir -p $(dirname "$commit") \
74+
repo=$1 &&
75+
commit=$2 &&
76+
cd "$repo" &&
77+
mkdir -p "$(dirname "$commit")" \
7878
|| error "Could not create directory for commit"
79-
echo "$commit" >"$commit"
79+
echo "$commit" >"$commit" &&
8080
git add "$commit" || error "Could not add commit"
8181
git commit -m "$commit" || error "Could not commit"
8282
)

0 commit comments

Comments
 (0)