summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Denton Liu <liu.denton@gmail.com>2020-01-06 23:53:00 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-01-07 12:23:32 -0800
commit5020f6806ac910d52f781ac76719c1cf66715632 (patch)
tree403f5073a40455843b7e962fb55503ec67cac336
parentt2018: add space between function name and () (diff)
downloadtgif-5020f6806ac910d52f781ac76719c1cf66715632.tar.xz
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>
-rwxr-xr-xt/t2018-checkout-branch.sh3
1 files changed, 2 insertions, 1 deletions
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"