Thread (15 messages) flat view 15 messages, 2 authors, 2016-06-15
STALE3729d

[PATCH 01/14] t9365-continuing-queries.sh: use the $( ... ) construct for command substitution

From: Elia Pinto <hidden>
Date: 2016-06-15 23:00:47
Subsystem: the rest · Maintainer: Linus Torvalds

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
   sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
---
 contrib/mw-to-git/t/t9365-continuing-queries.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/mw-to-git/t/t9365-continuing-queries.sh b/contrib/mw-to-git/t/t9365-continuing-queries.sh
index 27e267f..0164547 100755
--- a/contrib/mw-to-git/t/t9365-continuing-queries.sh
+++ b/contrib/mw-to-git/t/t9365-continuing-queries.sh
@@ -9,7 +9,7 @@ test_check_precond
 
 test_expect_success 'creating page w/ >500 revisions' '
 	wiki_reset &&
-	for i in `test_seq 501`
+	for i in $(test_seq 501)
 	do
 		echo "creating revision $i" &&
 		wiki_editpage foo "revision $i<br/>" true
-- 
1.7.10.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help