[PATCH v2 03/16] t2018: improve style of if-statement
From: Denton Liu <hidden>
Date: 2020-01-07 04:53:38
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Denton Liu <hidden>
Date: 2020-01-07 04:53:38
Subsystem:
the rest · Maintainer:
Linus Torvalds
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 <redacted> --- t/t2018-checkout-branch.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
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"
--
2.25.0.rc1.180.g49a268d3eb