The $(...) notation is just plain nicer.
Signed-off-by: Karl Hasselström <kha@treskal.com>
test_create_repo () {
test "$#" = 1 ||
error "bug in the test script: not 1 parameter to test-create-repo"
test_create_repo () {
test "$#" = 1 ||
error "bug in the test script: not 1 parameter to test-create-repo"
repo="$1"
mkdir "$repo"
cd "$repo" || error "Cannot setup test environment"
git init >/dev/null 2>&1 || error "cannot run git init"
echo "empty start" | \
repo="$1"
mkdir "$repo"
cd "$repo" || error "Cannot setup test environment"
git init >/dev/null 2>&1 || error "cannot run git init"
echo "empty start" | \
- git commit-tree `git write-tree` >.git/refs/heads/master 2>&4 || \
+ git commit-tree $(git write-tree) >.git/refs/heads/master 2>&4 || \
error "cannot run git commit"
mv .git/hooks .git/hooks-disabled
cd "$owd"
error "cannot run git commit"
mv .git/hooks .git/hooks-disabled
cd "$owd"