{"thread":{"id":"36425","subject":"[PATCH 001/14] howto-index.sh: use the $( ... ) construct for command substitution","startedAt":"2014-04-16T17:29:45Z","lastAt":"2014-04-17T18:25:29Z","messageCount":16,"participants":["Elia Pinto","Matthieu Moy","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":14},"messages":[{"id":"238953","messageId":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":null,"subject":"[PATCH 001/14] howto-index.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:45Z","receivedAt":"2014-04-16T17:29:45Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n Documentation/howto-index.sh |   12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/howto-index.sh b/Documentation/howto-index.sh\nindex a234086..167b363 100755\n--- a/Documentation/howto-index.sh\n+++ b/Documentation/howto-index.sh\n@@ -11,8 +11,8 @@ EOF\n \n for txt\n do\n-\ttitle=`expr \"$txt\" : '.*/\\(.*\\)\\.txt$'`\n-\tfrom=`sed -ne '\n+\ttitle=$(expr \"$txt\" : '.*/\\(.*\\)\\.txt$')\n+\tfrom=$(sed -ne '\n \t/^$/q\n \t/^From:[ \t]/{\n \t\ts///\n@@ -21,9 +21,9 @@ do\n \t\ts/^/by /\n \t\tp\n \t}\n-\t' \"$txt\"`\n+\t' \"$txt\")\n \n-\tabstract=`sed -ne '\n+\tabstract=$(sed -ne '\n \t/^Abstract:[ \t]/{\n \t\ts/^[^ \t]*//\n \t\tx\n@@ -39,11 +39,11 @@ do\n \t\tx\n \t\tp\n \t\tq\n-\t}' \"$txt\"`\n+\t}' \"$txt\")\n \n \tif grep 'Content-type: text/asciidoc' >/dev/null $txt\n \tthen\n-\t\tfile=`expr \"$txt\" : '\\(.*\\)\\.txt$'`.html\n+\t\tfile=$(expr \"$txt\" : '\\(.*\\)\\.txt$').html\n \telse\n \t\tfile=\"$txt\"\n \tfi\n-- \n1.7.10.4\n"},{"id":"238960","messageId":"1397669398-25410-2-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 002/14] install-webdoc.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:46Z","receivedAt":"2014-04-16T17:29:46Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n Documentation/install-webdoc.sh |    6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/install-webdoc.sh b/Documentation/install-webdoc.sh\nindex 76d69a9..ed8b4ff 100755\n--- a/Documentation/install-webdoc.sh\n+++ b/Documentation/install-webdoc.sh\n@@ -18,17 +18,17 @@ do\n \telse\n \t\techo >&2 \"# install $h $T/$h\"\n \t\trm -f \"$T/$h\"\n-\t\tmkdir -p `dirname \"$T/$h\"`\n+\t\tmkdir -p $(dirname \"$T/$h\")\n \t\tcp \"$h\" \"$T/$h\"\n \tfi\n done\n-strip_leading=`echo \"$T/\" | sed -e 's|.|.|g'`\n+strip_leading=$(echo \"$T/\" | sed -e 's|.|.|g')\n for th in \\\n \t\"$T\"/*.html \"$T\"/*.txt \\\n \t\"$T\"/howto/*.txt \"$T\"/howto/*.html \\\n \t\"$T\"/technical/*.txt \"$T\"/technical/*.html\n do\n-\th=`expr \"$th\" : \"$strip_leading\"'\\(.*\\)'`\n+\th=$(expr \"$th\" : \"$strip_leading\"'\\(.*\\)')\n \tcase \"$h\" in\n \tRelNotes-*.txt | index.html) continue ;;\n \tesac\n-- \n1.7.10.4\n"},{"id":"238965","messageId":"1397669398-25410-3-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 003/14] git-checkout.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:47Z","receivedAt":"2014-04-16T17:29:47Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-checkout.sh |    8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/examples/git-checkout.sh b/contrib/examples/git-checkout.sh\nindex d2c1f98..683cae7 100755\n--- a/contrib/examples/git-checkout.sh\n+++ b/contrib/examples/git-checkout.sh\n@@ -222,7 +222,7 @@ else\n \n \t# Match the index to the working tree, and do a three-way.\n \tgit diff-files --name-only | git update-index --remove --stdin &&\n-\twork=`git write-tree` &&\n+\twork=$(git write-tree) &&\n \tgit read-tree $v --reset -u $new || exit\n \n \teval GITHEAD_$new='${new_name:-${branch:-$new}}' &&\n@@ -233,7 +233,7 @@ else\n \t# Do not register the cleanly merged paths in the index yet.\n \t# this is not a real merge before committing, but just carrying\n \t# the working tree changes along.\n-\tunmerged=`git ls-files -u`\n+\tunmerged=$(git ls-files -u)\n \tgit read-tree $v --reset $new\n \tcase \"$unmerged\" in\n \t'')\t;;\n@@ -269,7 +269,7 @@ if [ \"$?\" -eq 0 ]; then\n \tfi\n \tif test -n \"$branch\"\n \tthen\n-\t\told_branch_name=`expr \"z$oldbranch\" : 'zrefs/heads/\\(.*\\)'`\n+\t\told_branch_name=$(expr \"z$oldbranch\" : 'zrefs/heads/\\(.*\\)')\n \t\tGIT_DIR=\"$GIT_DIR\" git symbolic-ref -m \"checkout: moving from ${old_branch_name:-$old} to $branch\" HEAD \"refs/heads/$branch\"\n \t\tif test -n \"$quiet\"\n \t\tthen\n@@ -282,7 +282,7 @@ if [ \"$?\" -eq 0 ]; then\n \t\tfi\n \telif test -n \"$detached\"\n \tthen\n-\t\told_branch_name=`expr \"z$oldbranch\" : 'zrefs/heads/\\(.*\\)'`\n+\t\told_branch_name=$(expr \"z$oldbranch\" : 'zrefs/heads/\\(.*\\)')\n \t\tgit update-ref --no-deref -m \"checkout: moving from ${old_branch_name:-$old} to $arg\" HEAD \"$detached\" ||\n \t\t\tdie \"Cannot detach HEAD\"\n \t\tif test -n \"$detach_warn\"\n-- \n1.7.10.4\n"},{"id":"238966","messageId":"1397669398-25410-4-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 004/14] git-clone.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:48Z","receivedAt":"2014-04-16T17:29:48Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-clone.sh |   20 ++++++++++----------\n 1 file changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/contrib/examples/git-clone.sh b/contrib/examples/git-clone.sh\nindex 547228e..b4c9376 100755\n--- a/contrib/examples/git-clone.sh\n+++ b/contrib/examples/git-clone.sh\n@@ -40,7 +40,7 @@ eval \"$(echo \"$OPTIONS_SPEC\" | git rev-parse --parseopt -- \"$@\" || echo exit $?)\n \n get_repo_base() {\n \t(\n-\t\tcd \"`/bin/pwd`\" &&\n+\t\tcd \"$(/bin/pwd)\" &&\n \t\tcd \"$1\" || cd \"$1.git\" &&\n \t\t{\n \t\t\tcd .git\n@@ -50,7 +50,7 @@ get_repo_base() {\n }\n \n if [ -n \"$GIT_SSL_NO_VERIFY\" -o \\\n-\t\"`git config --bool http.sslVerify`\" = false ]; then\n+\t\"$(git config --bool http.sslVerify)\" = false ]; then\n     curl_extra_args=\"-k\"\n fi\n \n@@ -70,7 +70,7 @@ clone_dumb_http () {\n \tclone_tmp=\"$GIT_DIR/clone-tmp\" &&\n \tmkdir -p \"$clone_tmp\" || exit 1\n \tif [ -n \"$GIT_CURL_FTP_NO_EPSV\" -o \\\n-\t\t\"`git config --bool http.noEPSV`\" = true ]; then\n+\t\t\"$(git config --bool http.noEPSV)\" = true ]; then\n \t\tcurl_extra_args=\"${curl_extra_args} --disable-epsv\"\n \tfi\n \thttp_fetch \"$1/info/refs\" \"$clone_tmp/refs\" ||\n@@ -79,7 +79,7 @@ Perhaps git-update-server-info needs to be run there?\"\n \ttest \"z$quiet\" = z && v=-v || v=\n \twhile read sha1 refname\n \tdo\n-\t\tname=`expr \"z$refname\" : 'zrefs/\\(.*\\)'` &&\n+\t\tname=$(expr \"z$refname\" : 'zrefs/\\(.*\\)') &&\n \t\tcase \"$name\" in\n \t\t*^*)\tcontinue;;\n \t\tesac\n@@ -88,7 +88,7 @@ Perhaps git-update-server-info needs to be run there?\"\n \t\t*)\tcontinue ;;\n \t\tesac\n \t\tif test -n \"$use_separate_remote\" &&\n-\t\t   branch_name=`expr \"z$name\" : 'zheads/\\(.*\\)'`\n+\t\t   branch_name=$(expr \"z$name\" : 'zheads/\\(.*\\)')\n \t\tthen\n \t\t\ttname=\"remotes/$origin/$branch_name\"\n \t\telse\n@@ -100,7 +100,7 @@ Perhaps git-update-server-info needs to be run there?\"\n \thttp_fetch \"$1/HEAD\" \"$GIT_DIR/REMOTE_HEAD\" ||\n \trm -f \"$GIT_DIR/REMOTE_HEAD\"\n \tif test -f \"$GIT_DIR/REMOTE_HEAD\"; then\n-\t\thead_sha1=`cat \"$GIT_DIR/REMOTE_HEAD\"`\n+\t\thead_sha1=$(cat \"$GIT_DIR/REMOTE_HEAD\")\n \t\tcase \"$head_sha1\" in\n \t\t'ref: refs/'*)\n \t\t\t;;\n@@ -444,15 +444,15 @@ then\n \t# a non-bare repository is always in separate-remote layout\n \tremote_top=\"refs/remotes/$origin\"\n \thead_sha1=\n-\ttest ! -r \"$GIT_DIR/REMOTE_HEAD\" || head_sha1=`cat \"$GIT_DIR/REMOTE_HEAD\"`\n+\ttest ! -r \"$GIT_DIR/REMOTE_HEAD\" || head_sha1=$(cat \"$GIT_DIR/REMOTE_HEAD\")\n \tcase \"$head_sha1\" in\n \t'ref: refs/'*)\n \t\t# Uh-oh, the remote told us (http transport done against\n \t\t# new style repository with a symref HEAD).\n \t\t# Ideally we should skip the guesswork but for now\n \t\t# opt for minimum change.\n-\t\thead_sha1=`expr \"z$head_sha1\" : 'zref: refs/heads/\\(.*\\)'`\n-\t\thead_sha1=`cat \"$GIT_DIR/$remote_top/$head_sha1\"`\n+\t\thead_sha1=$(expr \"z$head_sha1\" : 'zref: refs/heads/\\(.*\\)')\n+\t\thead_sha1=$(cat \"$GIT_DIR/$remote_top/$head_sha1\")\n \t\t;;\n \tesac\n \n@@ -467,7 +467,7 @@ then\n \t\twhile read name\n \t\tdo\n \t\t\ttest t = $done && continue\n-\t\t\tbranch_tip=`cat \"$GIT_DIR/$remote_top/$name\"`\n+\t\t\tbranch_tip=$(cat \"$GIT_DIR/$remote_top/$name\")\n \t\t\tif test \"$head_sha1\" = \"$branch_tip\"\n \t\t\tthen\n \t\t\t\techo \"$name\"\n-- \n1.7.10.4\n"},{"id":"238964","messageId":"1397669398-25410-5-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 005/14] git-commit.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:49Z","receivedAt":"2014-04-16T17:29:49Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-commit.sh |   10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/contrib/examples/git-commit.sh b/contrib/examples/git-commit.sh\nindex 4aab1a6..5cafe2e 100755\n--- a/contrib/examples/git-commit.sh\n+++ b/contrib/examples/git-commit.sh\n@@ -91,7 +91,7 @@ signoff=\n force_author=\n only_include_assumed=\n untracked_files=\n-templatefile=\"`git config commit.template`\"\n+templatefile=\"$(git config commit.template)\"\n while test $# != 0\n do\n \tcase \"$1\" in\n@@ -350,7 +350,7 @@ t,)\n \t\tTMP_INDEX=\"$GIT_DIR/tmp-index$$\"\n \t\tW=\n \t\ttest -z \"$initial_commit\" && W=--with-tree=HEAD\n-\t\tcommit_only=`git ls-files --error-unmatch $W -- \"$@\"` || exit\n+\t\tcommit_only=$(git ls-files --error-unmatch $W -- \"$@\") || exit\n \n \t\t# Build a temporary index and update the real index\n \t\t# the same way.\n@@ -475,8 +475,8 @@ then\n fi\n if test '' != \"$force_author\"\n then\n-\tGIT_AUTHOR_NAME=`expr \"z$force_author\" : 'z\\(.*[^ ]\\) *<.*'` &&\n-\tGIT_AUTHOR_EMAIL=`expr \"z$force_author\" : '.*\\(<.*\\)'` &&\n+\tGIT_AUTHOR_NAME=$(expr \"z$force_author\" : 'z\\(.*[^ ]\\) *<.*') &&\n+\tGIT_AUTHOR_EMAIL=$(expr \"z$force_author\" : '.*\\(<.*\\)') &&\n \ttest '' != \"$GIT_AUTHOR_NAME\" &&\n \ttest '' != \"$GIT_AUTHOR_EMAIL\" ||\n \tdie \"malformed --author parameter\"\n@@ -489,7 +489,7 @@ then\n \trloga='commit'\n \tif [ -f \"$GIT_DIR/MERGE_HEAD\" ]; then\n \t\trloga='commit (merge)'\n-\t\tPARENTS=\"-p HEAD \"`sed -e 's/^/-p /' \"$GIT_DIR/MERGE_HEAD\"`\n+\t\tPARENTS=\"-p HEAD \"$(sed -e 's/^/-p /' \"$GIT_DIR/MERGE_HEAD\")\n \telif test -n \"$amend\"; then\n \t\trloga='commit (amend)'\n \t\tPARENTS=$(git cat-file commit HEAD |\n-- \n1.7.10.4\n"},{"id":"238963","messageId":"1397669398-25410-6-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 006/14] git-fetch.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:50Z","receivedAt":"2014-04-16T17:29:50Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-fetch.sh |    6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/examples/git-fetch.sh b/contrib/examples/git-fetch.sh\nindex a314273..5540709 100755\n--- a/contrib/examples/git-fetch.sh\n+++ b/contrib/examples/git-fetch.sh\n@@ -67,7 +67,7 @@ do\n \t\tkeep='-k -k'\n \t\t;;\n \t--depth=*)\n-\t\tshallow_depth=\"--depth=`expr \"z$1\" : 'z-[^=]*=\\(.*\\)'`\"\n+\t\tshallow_depth=\"--depth=$(expr \"z$1\" : 'z-[^=]*=\\(.*\\)')\"\n \t\t;;\n \t--depth)\n \t\tshift\n@@ -262,12 +262,12 @@ fetch_per_ref () {\n       http://* | https://* | ftp://*)\n \t  test -n \"$shallow_depth\" &&\n \t\tdie \"shallow clone with http not supported\"\n-\t  proto=`expr \"$remote\" : '\\([^:]*\\):'`\n+\t  proto=$(expr \"$remote\" : '\\([^:]*\\):')\n \t  if [ -n \"$GIT_SSL_NO_VERIFY\" ]; then\n \t      curl_extra_args=\"-k\"\n \t  fi\n \t  if [ -n \"$GIT_CURL_FTP_NO_EPSV\" -o \\\n-\t\t\"`git config --bool http.noEPSV`\" = true ]; then\n+\t\t\"$(git config --bool http.noEPSV)\" = true ]; then\n \t      noepsv_opt=\"--disable-epsv\"\n \t  fi\n \n-- \n1.7.10.4\n"},{"id":"238955","messageId":"1397669398-25410-7-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 007/14] git-ls-remote.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:51Z","receivedAt":"2014-04-16T17:29:51Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-ls-remote.sh |    4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/examples/git-ls-remote.sh b/contrib/examples/git-ls-remote.sh\nindex fec70bb..2aa89a7 100755\n--- a/contrib/examples/git-ls-remote.sh\n+++ b/contrib/examples/git-ls-remote.sh\n@@ -55,11 +55,11 @@ tmpdir=$tmp-d\n case \"$peek_repo\" in\n http://* | https://* | ftp://* )\n \tif [ -n \"$GIT_SSL_NO_VERIFY\" -o \\\n-\t\t\"`git config --bool http.sslVerify`\" = false ]; then\n+\t\t\"$(git config --bool http.sslVerify)\" = false ]; then\n \t\tcurl_extra_args=\"-k\"\n \tfi\n \tif [ -n \"$GIT_CURL_FTP_NO_EPSV\" -o \\\n-\t\t\"`git config --bool http.noEPSV`\" = true ]; then\n+\t\t\"$(git config --bool http.noEPSV)\" = true ]; then\n \t\tcurl_extra_args=\"${curl_extra_args} --disable-epsv\"\n \tfi\n \tcurl -nsf $curl_extra_args --header \"Pragma: no-cache\" \"$peek_repo/info/refs\" ||\n-- \n1.7.10.4\n"},{"id":"238954","messageId":"1397669398-25410-8-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 008/14] git-merge.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:52Z","receivedAt":"2014-04-16T17:29:52Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-merge.sh |    4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/examples/git-merge.sh b/contrib/examples/git-merge.sh\nindex a5e42a9..7e40f40 100755\n--- a/contrib/examples/git-merge.sh\n+++ b/contrib/examples/git-merge.sh\n@@ -341,7 +341,7 @@ case \"$use_strategies\" in\n '')\n \tcase \"$#\" in\n \t1)\n-\t\tvar=\"`git config --get pull.twohead`\"\n+\t\tvar=\"$(git config --get pull.twohead)\"\n \t\tif test -n \"$var\"\n \t\tthen\n \t\t\tuse_strategies=\"$var\"\n@@ -349,7 +349,7 @@ case \"$use_strategies\" in\n \t\t\tuse_strategies=\"$default_twohead_strategies\"\n \t\tfi ;;\n \t*)\n-\t\tvar=\"`git config --get pull.octopus`\"\n+\t\tvar=\"$(git config --get pull.octopus)\"\n \t\tif test -n \"$var\"\n \t\tthen\n \t\t\tuse_strategies=\"$var\"\n-- \n1.7.10.4\n"},{"id":"238956","messageId":"1397669398-25410-9-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 009/14] git-repack.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:53Z","receivedAt":"2014-04-16T17:29:53Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-repack.sh |    2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/examples/git-repack.sh b/contrib/examples/git-repack.sh\nindex 7579331..f312405 100755\n--- a/contrib/examples/git-repack.sh\n+++ b/contrib/examples/git-repack.sh\n@@ -49,7 +49,7 @@ do\n \tshift\n done\n \n-case \"`git config --bool repack.usedeltabaseoffset || echo true`\" in\n+case \"$(git config --bool repack.usedeltabaseoffset || echo true)\" in\n true)\n \textra=\"$extra --delta-base-offset\" ;;\n esac\n-- \n1.7.10.4\n"},{"id":"238958","messageId":"1397669398-25410-10-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 010/14] git-resolve.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:54Z","receivedAt":"2014-04-16T17:29:54Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-resolve.sh |    2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/examples/git-resolve.sh b/contrib/examples/git-resolve.sh\nindex 8f98142..48d0fc9 100755\n--- a/contrib/examples/git-resolve.sh\n+++ b/contrib/examples/git-resolve.sh\n@@ -75,7 +75,7 @@ case \"$common\" in\n \t\tGIT_INDEX_FILE=$G git read-tree -m $c $head $merge \\\n \t\t\t2>/dev/null || continue\n \t\t# Count the paths that are unmerged.\n-\t\tcnt=`GIT_INDEX_FILE=$G git ls-files --unmerged | wc -l`\n+\t\tcnt=$(GIT_INDEX_FILE=$G git ls-files --unmerged | wc -l)\n \t\tif test $best_cnt -le 0 -o $cnt -le $best_cnt\n \t\tthen\n \t\t\tbest=$c\n-- \n1.7.10.4\n"},{"id":"238961","messageId":"1397669398-25410-11-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 011/14] git-revert.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:55Z","receivedAt":"2014-04-16T17:29:55Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-revert.sh |    2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/examples/git-revert.sh b/contrib/examples/git-revert.sh\nindex 6bf155c..7e2aad5 100755\n--- a/contrib/examples/git-revert.sh\n+++ b/contrib/examples/git-revert.sh\n@@ -137,7 +137,7 @@ cherry-pick)\n \t\tq\n \t}'\n \n-\tlogmsg=`git show -s --pretty=raw --encoding=\"$encoding\" \"$commit\"`\n+\tlogmsg=$(git show -s --pretty=raw --encoding=\"$encoding\" \"$commit\")\n \tset_author_env=`echo \"$logmsg\" |\n \tLANG=C LC_ALL=C sed -ne \"$pick_author_script\"`\n \teval \"$set_author_env\"\n-- \n1.7.10.4\n"},{"id":"238962","messageId":"1397669398-25410-12-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 012/14] git-tag.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:56Z","receivedAt":"2014-04-16T17:29:56Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-tag.sh |    2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/examples/git-tag.sh b/contrib/examples/git-tag.sh\nindex 2c15bc9..1bd8f3c 100755\n--- a/contrib/examples/git-tag.sh\n+++ b/contrib/examples/git-tag.sh\n@@ -156,7 +156,7 @@ prev=0000000000000000000000000000000000000000\n if git show-ref --verify --quiet -- \"refs/tags/$name\"\n then\n     test -n \"$force\" || die \"tag '$name' already exists\"\n-    prev=`git rev-parse \"refs/tags/$name\"`\n+    prev=$(git rev-parse \"refs/tags/$name\")\n fi\n shift\n git check-ref-format \"tags/$name\" ||\n-- \n1.7.10.4\n"},{"id":"238957","messageId":"1397669398-25410-13-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 013/14] t9360-mw-to-git-clone.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:57Z","receivedAt":"2014-04-16T17:29:57Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/mw-to-git/t/t9360-mw-to-git-clone.sh |   14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh b/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh\nindex 811a90c..22f069d 100755\n--- a/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh\n+++ b/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh\n@@ -191,10 +191,10 @@ test_expect_success 'Git clone works with the shallow option' '\n \ttest_path_is_file mw_dir_11/Main_Page.mw &&\n \t(\n \t\tcd mw_dir_11 &&\n-\t\ttest `git log --oneline Nyan.mw | wc -l` -eq 1 &&\n-\t\ttest `git log --oneline Foo.mw | wc -l` -eq 1 &&\n-\t\ttest `git log --oneline Bar.mw | wc -l` -eq 1 &&\n-\t\ttest `git log --oneline Main_Page.mw | wc -l ` -eq 1\n+\t\ttest $(git log --oneline Nyan.mw | wc -l) -eq 1 &&\n+\t\ttest $(git log --oneline Foo.mw | wc -l) -eq 1 &&\n+\t\ttest $(git log --oneline Bar.mw | wc -l) -eq 1 &&\n+\t\ttest $(git log --oneline Main_Page.mw | wc -l ) -eq 1\n \t) &&\n \twiki_check_content mw_dir_11/Nyan.mw Nyan &&\n \twiki_check_content mw_dir_11/Foo.mw Foo &&\n@@ -218,9 +218,9 @@ test_expect_success 'Git clone works with the shallow option with a delete page'\n \ttest_path_is_file mw_dir_12/Main_Page.mw &&\n \t(\n \t\tcd mw_dir_12 &&\n-\t\ttest `git log --oneline Nyan.mw | wc -l` -eq 1 &&\n-\t\ttest `git log --oneline Bar.mw | wc -l` -eq 1 &&\n-\t\ttest `git log --oneline Main_Page.mw | wc -l ` -eq 1\n+\t\ttest $(git log --oneline Nyan.mw | wc -l) -eq 1 &&\n+\t\ttest $(git log --oneline Bar.mw | wc -l) -eq 1 &&\n+\t\ttest $(git log --oneline Main_Page.mw | wc -l ) -eq 1\n \t) &&\n \twiki_check_content mw_dir_12/Nyan.mw Nyan &&\n \twiki_check_content mw_dir_12/Bar.mw Bar &&\n-- \n1.7.10.4\n"},{"id":"238959","messageId":"1397669398-25410-14-git-send-email-gitter.spiros@gmail.com","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 014/14] t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-04-16T17:29:58Z","receivedAt":"2014-04-16T17:29:58Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n   sed -i 's@`\\(.*\\)`@$(\\1)@g' ${_f}\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh |    4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh\nindex 37021e2..6b0dbda 100755\n--- a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh\n+++ b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh\n@@ -70,8 +70,8 @@ test_expect_success 'The shallow option works with accents' '\n \ttest_path_is_file mw_dir_4/Main_Page.mw &&\n \t(\n \t\tcd mw_dir_4 &&\n-\t\ttest `git log --oneline Néoà.mw | wc -l` -eq 1 &&\n-\t\ttest `git log --oneline Main_Page.mw | wc -l ` -eq 1\n+\t\ttest $(git log --oneline Néoà.mw | wc -l) -eq 1 &&\n+\t\ttest $(git log --oneline Main_Page.mw | wc -l ) -eq 1\n \t) &&\n \twiki_check_content mw_dir_4/Néoà.mw Néoà &&\n \twiki_check_content mw_dir_4/Main_Page.mw Main_Page\n-- \n1.7.10.4\n"},{"id":"239012","messageId":"vpqsipc1gah.fsf@anie.imag.fr","threadId":"36425","inReplyTo":"1397669398-25410-1-git-send-email-gitter.spiros@gmail.com","subject":"Re: [PATCH 001/14] howto-index.sh: use the $( ... ) construct for command substitution","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2014-04-17T09:00:54Z","receivedAt":"2014-04-17T09:00:54Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Elia Pinto <gitter.spiros@gmail.com> writes:\n\n> The Git CodingGuidelines prefer the $(...) construct for command\n> substitution instead of using the backquotes `...`.\n\nFor patches 1 to 14:\n\nReviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n\n(reviewed the patches in my mailer, and the \"diff --color-words=.\" after\napplying in addition)\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"239031","messageId":"xmqqbnvzerty.fsf@gitster.dls.corp.google.com","threadId":"36425","inReplyTo":"vpqsipc1gah.fsf@anie.imag.fr","subject":"Re: [PATCH 001/14] howto-index.sh: use the $( ... ) construct for command substitution","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-04-17T18:25:29Z","receivedAt":"2014-04-17T18:25:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Elia Pinto <gitter.spiros@gmail.com> writes:\n>\n>> The Git CodingGuidelines prefer the $(...) construct for command\n>> substitution instead of using the backquotes `...`.\n>\n> For patches 1 to 14:\n>\n> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n>\n> (reviewed the patches in my mailer, and the \"diff --color-words=.\" after\n> applying in addition)\n\nThanks both.\n\nIdeally, we should keep these scripted Porcelain implementations in\nthe contrib/examples/ hierarchy up-to-date to still work with the\nrecent versions of Git as they used to.  We do not need to backport\nnew features, but they should follow the best-current-practice of\nthe use of plumbing features and scripting in general, and this\nupdate is probably a step in the right direction.  It is somewhat\nsad that these are not tested but I do not think of an unintrusive\neasy way to keep them also in the test suite.\n\nWill queue.\n"}]}