diff options
author | Denton Liu <liu.denton@gmail.com> | 2020-01-07 07:53:00 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-01-07 23:23:32 +0300 |
commit | 5020f6806ac910d52f781ac76719c1cf66715632 (patch) | |
tree | 403f5073a40455843b7e962fb55503ec67cac336 /t/t2018-checkout-branch.sh | |
parent | 7ffb54618be9c44ff3213f660fca0a487893ef9a (diff) |
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>
Diffstat (limited to 't/t2018-checkout-branch.sh')
-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" |