diff options
author | Denton Liu <liu.denton@gmail.com> | 2020-01-06 23:53:00 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-01-07 12:23:32 -0800 |
commit | 5020f6806ac910d52f781ac76719c1cf66715632 (patch) | |
tree | 403f5073a40455843b7e962fb55503ec67cac336 | |
parent | t2018: add space between function name and () (diff) | |
download | tgif-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-x | t/t2018-checkout-branch.sh | 3 |
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" |