summaryrefslogtreecommitdiff
path: root/contrib/subtree/t
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2016-07-26 04:14:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-26 20:56:57 (GMT)
commitfbd3199a6d8c6b3fd1e9aa0034cee9a0c6a9bfb4 (patch)
tree8eece42b9159c5cc88258d645d11a887eeb3e14e /contrib/subtree/t
parent05219a1276341e72d8082d76b7f5ed394b7437a4 (diff)
downloadgit-fbd3199a6d8c6b3fd1e9aa0034cee9a0c6a9bfb4.zip
git-fbd3199a6d8c6b3fd1e9aa0034cee9a0c6a9bfb4.tar.gz
git-fbd3199a6d8c6b3fd1e9aa0034cee9a0c6a9bfb4.tar.bz2
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>
Diffstat (limited to 'contrib/subtree/t')
-rwxr-xr-xcontrib/subtree/t/t7900-subtree.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 3bf96a9..7e8be5a 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -16,16 +16,16 @@ export TEST_DIRECTORY
subtree_test_create_repo()
{
- test_create_repo "$1"
+ test_create_repo "$1" &&
(
- cd $1
+ cd "$1" &&
git config log.date relative
)
}
create()
{
- echo "$1" >"$1"
+ echo "$1" >"$1" &&
git add "$1"
}
@@ -71,12 +71,12 @@ join_commits()
}
test_create_commit() (
- repo=$1
- commit=$2
- cd "$repo"
- mkdir -p $(dirname "$commit") \
+ repo=$1 &&
+ commit=$2 &&
+ cd "$repo" &&
+ mkdir -p "$(dirname "$commit")" \
|| error "Could not create directory for commit"
- echo "$commit" >"$commit"
+ echo "$commit" >"$commit" &&
git add "$commit" || error "Could not add commit"
git commit -m "$commit" || error "Could not commit"
)