From: Denton Liu Date: Tue, 7 Jan 2020 04:53:00 +0000 (-0500) Subject: t2018: improve style of if-statement X-Git-Tag: v2.26.0-rc0~61^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5020f6806ac910d52f781ac76719c1cf66715632;p=thirdparty%2Fgit.git t2018: improve style of if-statement Convert `[]` to `test` and break if-then into separate lines, both of which bring the style in line with Git's coding guidelines. Signed-off-by: Denton Liu Signed-off-by: Junio C Hamano --- diff --git a/t/t2018-checkout-branch.sh b/t/t2018-checkout-branch.sh index 79b16e4677..61206a90fb 100755 --- a/t/t2018-checkout-branch.sh +++ b/t/t2018-checkout-branch.sh @@ -20,7 +20,8 @@ do_checkout () { exp_sha=${2:-$(git rev-parse --verify HEAD)} && # default options for git checkout: -b - if [ -z "$3" ]; then + if test -z "$3" + then opts="-b" else opts="$3"