git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
7ffb546
)
t2018: improve style of if-statement
author
Denton Liu
<redacted>
Tue, 7 Jan 2020 04:53:00 +0000
(23:53 -0500)
committer
Junio C Hamano
<redacted>
Tue, 7 Jan 2020 20:23:32 +0000
(12:23 -0800)
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>
Signed-off-by: Junio C Hamano <redacted>
t/t2018-checkout-branch.sh
patch
|
blob
|
history
diff --git
a/t/t2018-checkout-branch.sh
b/t/t2018-checkout-branch.sh
index 79b16e46773011c11029ddc3751cf8f3f19b9a74..61206a90fb485e181664451abe72d9c3f0db687d 100755
(executable)
--- 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"
git clone https://git.99rst.org/PROJECT