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 <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
05219a1276
commit
fbd3199a6d
@ -16,16 +16,16 @@ export TEST_DIRECTORY
|
|||||||
|
|
||||||
subtree_test_create_repo()
|
subtree_test_create_repo()
|
||||||
{
|
{
|
||||||
test_create_repo "$1"
|
test_create_repo "$1" &&
|
||||||
(
|
(
|
||||||
cd $1
|
cd "$1" &&
|
||||||
git config log.date relative
|
git config log.date relative
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
create()
|
create()
|
||||||
{
|
{
|
||||||
echo "$1" >"$1"
|
echo "$1" >"$1" &&
|
||||||
git add "$1"
|
git add "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,12 +71,12 @@ join_commits()
|
|||||||
}
|
}
|
||||||
|
|
||||||
test_create_commit() (
|
test_create_commit() (
|
||||||
repo=$1
|
repo=$1 &&
|
||||||
commit=$2
|
commit=$2 &&
|
||||||
cd "$repo"
|
cd "$repo" &&
|
||||||
mkdir -p $(dirname "$commit") \
|
mkdir -p "$(dirname "$commit")" \
|
||||||
|| error "Could not create directory for commit"
|
|| error "Could not create directory for commit"
|
||||||
echo "$commit" >"$commit"
|
echo "$commit" >"$commit" &&
|
||||||
git add "$commit" || error "Could not add commit"
|
git add "$commit" || error "Could not add commit"
|
||||||
git commit -m "$commit" || error "Could not commit"
|
git commit -m "$commit" || error "Could not commit"
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user