On Tue, Jul 26, 2016 at 12:14 AM, David Aguilar <davvid@xxxxxxxxx> wrote: > Allow whitespace in arguments to subtree_test_create_repo. > Add missing && chains. > > Signed-off-by: David Aguilar <davvid@xxxxxxxxx> > --- > diff --git 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" && Thanks, I noticed this in December 2015 while reviewing a patch on the list and have had a patch to fix it sitting in my queue since then but never found time to formalize it. > git config log.date relative > ) > } > > create() > { > - echo "$1" >"$1" > + echo "$1" >"$1" && > git add "$1" > } > > @@ -73,10 +73,10 @@ join_commits() > test_create_commit() ( > repo=$1 > commit=$2 Perhaps &&-chain the above two lines also to future-proof against someone inserting important code somewhere above the following 'cd'. > - cd "$repo" > - mkdir -p $(dirname "$commit") \ > + 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" > ) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html