Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 34da37c

Browse files
devzero2000gitster
authored andcommitted
git-merge.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 <[email protected]> Reviewed-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1b3cddd commit 34da37c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/examples/git-merge.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,15 @@ case "$use_strategies" in
341341
'')
342342
case "$#" in
343343
1)
344-
var="`git config --get pull.twohead`"
344+
var="$(git config --get pull.twohead)"
345345
if test -n "$var"
346346
then
347347
use_strategies="$var"
348348
else
349349
use_strategies="$default_twohead_strategies"
350350
fi ;;
351351
*)
352-
var="`git config --get pull.octopus`"
352+
var="$(git config --get pull.octopus)"
353353
if test -n "$var"
354354
then
355355
use_strategies="$var"

0 commit comments

Comments
 (0)