Thread (45 messages) 45 messages, 3 authors, 2020-01-26
STALE2348d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[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

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help