Skip to content

Commit 03db917

Browse files
devzero2000gitster
authored andcommitted
lib-cvs.sh: use the $( ... ) construct for command substitution
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 <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 5a43520 commit 03db917

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/lib-cvs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fi
1313
CVS="cvs -f"
1414
export CVS
1515

16-
cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`
16+
cvsps_version=$(cvsps -h 2>&1 | sed -ne 's/cvsps version //p')
1717
case "$cvsps_version" in
1818
2.1 | 2.2*)
1919
;;

0 commit comments

Comments
 (0)