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 коммит произвёл Junio C Hamano
Родитель 7ffb54618b
Коммит 5020f6806a
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -20,7 +20,8 @@ do_checkout () {
exp_sha=${2:-$(git rev-parse --verify HEAD)} && exp_sha=${2:-$(git rev-parse --verify HEAD)} &&
# default options for git checkout: -b # default options for git checkout: -b
if [ -z "$3" ]; then if test -z "$3"
then
opts="-b" opts="-b"
else else
opts="$3" opts="$3"