]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t2018: improve style of if-statement
authorDenton Liu <liu.denton@gmail.com>
Tue, 7 Jan 2020 04:53:00 +0000 (23:53 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Jan 2020 20:23:32 +0000 (12:23 -0800)
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>
t/t2018-checkout-branch.sh

index 79b16e46773011c11029ddc3751cf8f3f19b9a74..61206a90fb485e181664451abe72d9c3f0db687d 100755 (executable)
@@ -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"