@matheusbsbs / matheus-bagliano / commits / 5020f6806a
Fork 0

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>

Denton Liu committed Jan 6, 2020 at 23:53 UTC 5020f6806ac910d52f781ac76719c1cf66715632
1 file changed +2 -1
t/t2018-checkout-branch.sh
+2 -1
@@ -20,7 +20,8 @@ do_checkout () {
20 exp_sha=${2:-$(git rev-parse --verify HEAD)} &&
21
22 # default options for git checkout: -b
23 - if [ -z "$3" ]; then
23 + if test -z "$3"
24 + then
25 opts="-b"
26 else
27 opts="$3"