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 <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Denton Liu 2020-01-06 23:53:00 -05:00 committed by Junio C Hamano
parent 7ffb54618b
commit 5020f6806a

View file

@ -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"