{"thread":{"id":"41148","subject":"[PATCH 01/10] t/t7103-reset-bare.sh: use the $( ... ) construct for command substitution","startedAt":"2016-01-08T11:06:18Z","lastAt":"2016-01-08T23:19:16Z","messageCount":17,"participants":["Elia Pinto","Matthieu Moy","Junio C Hamano","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"275532","messageId":"1452251188-12939-1-git-send-email-gitter.spiros@gmail.com","threadId":"41148","inReplyTo":null,"subject":"[PATCH 00/10] use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T11:06:18Z","receivedAt":"2016-01-08T11:06:18Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"This patch series continues the changes introduced with the merge\n6753d8a85d543253d95184ec2faad6dc197f248:\n\n    Merge branch 'ep/shell-command-substitution'\n\n    Adjust shell scripts to use $(cmd) instead of `cmd`.\n\nThe last patch eliminates entirely the backquotes without replacing them \nfor optimization.\n\n\nThis is the  seventh series, the other will be sent separately.\n\nElia Pinto (10):\n  t/t7103-reset-bare.sh: use the $( ... ) construct for command\n    substitution\n  t/t7406-submodule-update.sh: use the $( ... ) construct for command\n    substitution\n  t/t7408-submodule-reference.sh: use the $( ... ) construct for command\n    substitution\n  t/t7504-commit-msg-hook.sh: use the $( ... ) construct for command\n    substitution\n  t/t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for\n    command substitution\n  t/t7602-merge-octopus-many.sh: use the $( ... ) construct for command\n    substitution\n  t/t7700-repack.sh: use the $( ... ) construct for command substitution\n  t/t8003-blame-corner-cases.sh: use the $( ... ) construct for command\n    substitution\n  t/t9001-send-email.sh: use the $( ... ) construct for command\n    substitution\n  t/t9001-send-email.sh: get rid of unnecessary backquotes\n\n t/t7103-reset-bare.sh              |  2 +-\n t/t7406-submodule-update.sh        |  4 ++--\n t/t7408-submodule-reference.sh     |  2 +-\n t/t7504-commit-msg-hook.sh         |  2 +-\n t/t7505-prepare-commit-msg-hook.sh | 32 ++++++++++++++++----------------\n t/t7602-merge-octopus-many.sh      |  8 ++++----\n t/t7700-repack.sh                  |  4 ++--\n t/t8003-blame-corner-cases.sh      |  4 ++--\n t/t9001-send-email.sh              | 12 ++++++------\n 9 files changed, 35 insertions(+), 35 deletions(-)\n\n-- \n2.3.3.GIT\n"},{"id":"275531","messageId":"1452251188-12939-2-git-send-email-gitter.spiros@gmail.com","threadId":"41148","inReplyTo":"1452251188-12939-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 01/10] t/t7103-reset-bare.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T11:06:19Z","receivedAt":"2016-01-08T11:06:19Z","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\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n t/t7103-reset-bare.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t7103-reset-bare.sh b/t/t7103-reset-bare.sh\nindex 1eef93c..afe36a5 100755\n--- a/t/t7103-reset-bare.sh\n+++ b/t/t7103-reset-bare.sh\n@@ -63,7 +63,7 @@ test_expect_success '\"mixed\" reset is not allowed in bare' '\n \n test_expect_success '\"soft\" reset is allowed in bare' '\n \tgit reset --soft HEAD^ &&\n-\ttest \"`git show --pretty=format:%s | head -n 1`\" = \"one\"\n+\ttest \"$(git show --pretty=format:%s | head -n 1)\" = \"one\"\n '\n \n test_done\n-- \n2.3.3.GIT\n"},{"id":"275539","messageId":"1452251188-12939-3-git-send-email-gitter.spiros@gmail.com","threadId":"41148","inReplyTo":"1452251188-12939-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 02/10] t/t7406-submodule-update.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T11:06:20Z","receivedAt":"2016-01-08T11:06:20Z","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\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n t/t7406-submodule-update.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh\nindex dda3929..68ea31d 100755\n--- a/t/t7406-submodule-update.sh\n+++ b/t/t7406-submodule-update.sh\n@@ -14,8 +14,8 @@ submodule and \"git submodule update --rebase/--merge\" does not detach the HEAD.\n \n compare_head()\n {\n-    sha_master=`git rev-list --max-count=1 master`\n-    sha_head=`git rev-list --max-count=1 HEAD`\n+    sha_master=$(git rev-list --max-count=1 master)\n+    sha_head=$(git rev-list --max-count=1 HEAD)\n \n     test \"$sha_master\" = \"$sha_head\"\n }\n-- \n2.3.3.GIT\n"},{"id":"275541","messageId":"1452251188-12939-4-git-send-email-gitter.spiros@gmail.com","threadId":"41148","inReplyTo":"1452251188-12939-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 03/10] t/t7408-submodule-reference.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T11:06:21Z","receivedAt":"2016-01-08T11:06:21Z","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\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n t/t7408-submodule-reference.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t7408-submodule-reference.sh b/t/t7408-submodule-reference.sh\nindex b770b2f..eaea19b 100755\n--- a/t/t7408-submodule-reference.sh\n+++ b/t/t7408-submodule-reference.sh\n@@ -6,7 +6,7 @@\n test_description='test clone --reference'\n . ./test-lib.sh\n \n-base_dir=`pwd`\n+base_dir=$(pwd)\n \n U=$base_dir/UPLOAD_LOG\n \n-- \n2.3.3.GIT\n"},{"id":"275535","messageId":"1452251188-12939-5-git-send-email-gitter.spiros@gmail.com","threadId":"41148","inReplyTo":"1452251188-12939-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 04/10] t/t7504-commit-msg-hook.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T11:06:22Z","receivedAt":"2016-01-08T11:06:22Z","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\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n t/t7504-commit-msg-hook.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t7504-commit-msg-hook.sh b/t/t7504-commit-msg-hook.sh\nindex 1f53ea8..8728db6 100755\n--- a/t/t7504-commit-msg-hook.sh\n+++ b/t/t7504-commit-msg-hook.sh\n@@ -179,7 +179,7 @@ EOF\n chmod +x \"$HOOK\"\n \n commit_msg_is () {\n-\ttest \"`git log --pretty=format:%s%b -1`\" = \"$1\"\n+\ttest \"$(git log --pretty=format:%s%b -1)\" = \"$1\"\n }\n \n test_expect_success 'hook edits commit message' '\n-- \n2.3.3.GIT\n"},{"id":"275540","messageId":"1452251188-12939-6-git-send-email-gitter.spiros@gmail.com","threadId":"41148","inReplyTo":"1452251188-12939-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 05/10] t/t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T11:06:23Z","receivedAt":"2016-01-08T11:06:23Z","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\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n t/t7505-prepare-commit-msg-hook.sh | 32 ++++++++++++++++----------------\n 1 file changed, 16 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh\nindex 03dce09..b13f729 100755\n--- a/t/t7505-prepare-commit-msg-hook.sh\n+++ b/t/t7505-prepare-commit-msg-hook.sh\n@@ -53,7 +53,7 @@ test_expect_success 'with hook (-m)' '\n \techo \"more\" >> file &&\n \tgit add file &&\n \tgit commit -m \"more\" &&\n-\ttest \"`git log -1 --pretty=format:%s`\" = \"message (no editor)\"\n+\ttest \"$(git log -1 --pretty=format:%s)\" = \"message (no editor)\"\n \n '\n \n@@ -62,7 +62,7 @@ test_expect_success 'with hook (-m editor)' '\n \techo \"more\" >> file &&\n \tgit add file &&\n \tGIT_EDITOR=\"\\\"\\$FAKE_EDITOR\\\"\" git commit -e -m \"more more\" &&\n-\ttest \"`git log -1 --pretty=format:%s`\" = message\n+\ttest \"$(git log -1 --pretty=format:%s)\" = message\n \n '\n \n@@ -71,7 +71,7 @@ test_expect_success 'with hook (-t)' '\n \techo \"more\" >> file &&\n \tgit add file &&\n \tgit commit -t \"$(git rev-parse --git-dir)/template\" &&\n-\ttest \"`git log -1 --pretty=format:%s`\" = template\n+\ttest \"$(git log -1 --pretty=format:%s)\" = template\n \n '\n \n@@ -80,7 +80,7 @@ test_expect_success 'with hook (-F)' '\n \techo \"more\" >> file &&\n \tgit add file &&\n \t(echo more | git commit -F -) &&\n-\ttest \"`git log -1 --pretty=format:%s`\" = \"message (no editor)\"\n+\ttest \"$(git log -1 --pretty=format:%s)\" = \"message (no editor)\"\n \n '\n \n@@ -89,17 +89,17 @@ test_expect_success 'with hook (-F editor)' '\n \techo \"more\" >> file &&\n \tgit add file &&\n \t(echo more more | GIT_EDITOR=\"\\\"\\$FAKE_EDITOR\\\"\" git commit -e -F -) &&\n-\ttest \"`git log -1 --pretty=format:%s`\" = message\n+\ttest \"$(git log -1 --pretty=format:%s)\" = message\n \n '\n \n test_expect_success 'with hook (-C)' '\n \n-\thead=`git rev-parse HEAD` &&\n+\thead=$(git rev-parse HEAD) &&\n \techo \"more\" >> file &&\n \tgit add file &&\n \tgit commit -C $head &&\n-\ttest \"`git log -1 --pretty=format:%s`\" = \"$head (no editor)\"\n+\ttest \"$(git log -1 --pretty=format:%s)\" = \"$head (no editor)\"\n \n '\n \n@@ -108,27 +108,27 @@ test_expect_success 'with hook (editor)' '\n \techo \"more more\" >> file &&\n \tgit add file &&\n \tGIT_EDITOR=\"\\\"\\$FAKE_EDITOR\\\"\" git commit &&\n-\ttest \"`git log -1 --pretty=format:%s`\" = default\n+\ttest \"$(git log -1 --pretty=format:%s)\" = default\n \n '\n \n test_expect_success 'with hook (--amend)' '\n \n-\thead=`git rev-parse HEAD` &&\n+\thead=$(git rev-parse HEAD) &&\n \techo \"more\" >> file &&\n \tgit add file &&\n \tGIT_EDITOR=\"\\\"\\$FAKE_EDITOR\\\"\" git commit --amend &&\n-\ttest \"`git log -1 --pretty=format:%s`\" = \"$head\"\n+\ttest \"$(git log -1 --pretty=format:%s)\" = \"$head\"\n \n '\n \n test_expect_success 'with hook (-c)' '\n \n-\thead=`git rev-parse HEAD` &&\n+\thead=$(git rev-parse HEAD) &&\n \techo \"more\" >> file &&\n \tgit add file &&\n \tGIT_EDITOR=\"\\\"\\$FAKE_EDITOR\\\"\" git commit -c $head &&\n-\ttest \"`git log -1 --pretty=format:%s`\" = \"$head\"\n+\ttest \"$(git log -1 --pretty=format:%s)\" = \"$head\"\n \n '\n \n@@ -141,7 +141,7 @@ test_expect_success 'with hook (merge)' '\n \tgit commit -m other &&\n \tgit checkout - &&\n \tgit merge --no-ff other &&\n-\ttest \"`git log -1 --pretty=format:%s`\" = \"merge (no editor)\"\n+\ttest \"$(git log -1 --pretty=format:%s)\" = \"merge (no editor)\"\n '\n \n test_expect_success 'with hook and editor (merge)' '\n@@ -153,7 +153,7 @@ test_expect_success 'with hook and editor (merge)' '\n \tgit commit -m other &&\n \tgit checkout - &&\n \tenv GIT_EDITOR=\"\\\"\\$FAKE_EDITOR\\\"\" git merge --no-ff -e other &&\n-\ttest \"`git log -1 --pretty=format:%s`\" = \"merge\"\n+\ttest \"$(git log -1 --pretty=format:%s)\" = \"merge\"\n '\n \n cat > \"$HOOK\" <<'EOF'\n@@ -164,7 +164,7 @@ EOF\n test_expect_success 'with failing hook' '\n \n \ttest_when_finished \"git checkout -f master\" &&\n-\thead=`git rev-parse HEAD` &&\n+\thead=$(git rev-parse HEAD) &&\n \techo \"more\" >> file &&\n \tgit add file &&\n \ttest_must_fail env GIT_EDITOR=\"\\\"\\$FAKE_EDITOR\\\"\" git commit -c $head\n@@ -174,7 +174,7 @@ test_expect_success 'with failing hook' '\n test_expect_success 'with failing hook (--no-verify)' '\n \n \ttest_when_finished \"git checkout -f master\" &&\n-\thead=`git rev-parse HEAD` &&\n+\thead=$(git rev-parse HEAD) &&\n \techo \"more\" >> file &&\n \tgit add file &&\n \ttest_must_fail env GIT_EDITOR=\"\\\"\\$FAKE_EDITOR\\\"\" git commit --no-verify -c $head\n-- \n2.3.3.GIT\n"},{"id":"275536","messageId":"1452251188-12939-7-git-send-email-gitter.spiros@gmail.com","threadId":"41148","inReplyTo":"1452251188-12939-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 06/10] t/t7602-merge-octopus-many.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T11:06:24Z","receivedAt":"2016-01-08T11:06:24Z","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\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n t/t7602-merge-octopus-many.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t7602-merge-octopus-many.sh b/t/t7602-merge-octopus-many.sh\nindex 955f09f..6abe441 100755\n--- a/t/t7602-merge-octopus-many.sh\n+++ b/t/t7602-merge-octopus-many.sh\n@@ -19,7 +19,7 @@ test_expect_success 'setup' '\n \t\tgit add c$i.c &&\n \t\tgit commit -m c$i &&\n \t\tgit tag c$i &&\n-\t\ti=`expr $i + 1` || return 1\n+\t\ti=$(expr $i + 1) || return 1\n \tdone\n '\n \n@@ -30,7 +30,7 @@ test_expect_success 'merge c1 with c2, c3, c4, ... c29' '\n \twhile test $i -le 30\n \tdo\n \t\trefs=\"$refs c$i\"\n-\t\ti=`expr $i + 1`\n+\t\ti=$(expr $i + 1)\n \tdone &&\n \tgit merge $refs &&\n \ttest \"$(git rev-parse c1)\" != \"$(git rev-parse HEAD)\" &&\n@@ -38,14 +38,14 @@ test_expect_success 'merge c1 with c2, c3, c4, ... c29' '\n \twhile test $i -le 30\n \tdo\n \t\ttest \"$(git rev-parse c$i)\" = \"$(git rev-parse HEAD^$i)\" &&\n-\t\ti=`expr $i + 1` || return 1\n+\t\ti=$(expr $i + 1) || return 1\n \tdone &&\n \tgit diff --exit-code &&\n \ti=1 &&\n \twhile test $i -le 30\n \tdo\n \t\ttest -f c$i.c &&\n-\t\ti=`expr $i + 1` || return 1\n+\t\ti=$(expr $i + 1) || return 1\n \tdone\n '\n \n-- \n2.3.3.GIT\n"},{"id":"275533","messageId":"1452251188-12939-8-git-send-email-gitter.spiros@gmail.com","threadId":"41148","inReplyTo":"1452251188-12939-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 07/10] t/t7700-repack.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T11:06:25Z","receivedAt":"2016-01-08T11:06:25Z","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\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n t/t7700-repack.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t7700-repack.sh b/t/t7700-repack.sh\nindex 021c547..6061a04 100755\n--- a/t/t7700-repack.sh\n+++ b/t/t7700-repack.sh\n@@ -69,7 +69,7 @@ test_expect_success 'writing bitmaps via config can duplicate .keep objects' '\n \n test_expect_success 'loose objects in alternate ODB are not repacked' '\n \tmkdir alt_objects &&\n-\techo `pwd`/alt_objects > .git/objects/info/alternates &&\n+\techo $(pwd)/alt_objects > .git/objects/info/alternates &&\n \techo content3 > file3 &&\n \tobjsha1=$(GIT_OBJECT_DIRECTORY=alt_objects git hash-object -w file3) &&\n \tgit add file3 &&\n@@ -168,7 +168,7 @@ test_expect_success 'packed unreachable obs in alternate ODB are not loosened' '\n '\n \n test_expect_success 'local packed unreachable obs that exist in alternate ODB are not loosened' '\n-\techo `pwd`/alt_objects > .git/objects/info/alternates &&\n+\techo $(pwd)/alt_objects > .git/objects/info/alternates &&\n \techo \"$csha1\" | git pack-objects --non-empty --all --reflog pack &&\n \trm -f .git/objects/pack/* &&\n \tmv pack-* .git/objects/pack/ &&\n-- \n2.3.3.GIT\n"},{"id":"275534","messageId":"1452251188-12939-9-git-send-email-gitter.spiros@gmail.com","threadId":"41148","inReplyTo":"1452251188-12939-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 08/10] t/t8003-blame-corner-cases.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T11:06:26Z","receivedAt":"2016-01-08T11:06:26Z","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\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n t/t8003-blame-corner-cases.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh\nindex 16f1442..6568429 100755\n--- a/t/t8003-blame-corner-cases.sh\n+++ b/t/t8003-blame-corner-cases.sh\n@@ -153,7 +153,7 @@ test_expect_success 'blame path that used to be a directory' '\n '\n \n test_expect_success 'blame to a commit with no author name' '\n-  TREE=`git rev-parse HEAD:` &&\n+  TREE=$(git rev-parse HEAD:) &&\n   cat >badcommit <<EOF &&\n tree $TREE\n author <noname> 1234567890 +0000\n@@ -161,7 +161,7 @@ committer David Reiss <dreiss@facebook.com> 1234567890 +0000\n \n some message\n EOF\n-  COMMIT=`git hash-object -t commit -w badcommit` &&\n+  COMMIT=$(git hash-object -t commit -w badcommit) &&\n   git --no-pager blame $COMMIT -- uno >/dev/null\n '\n \n-- \n2.3.3.GIT\n"},{"id":"275537","messageId":"1452251188-12939-10-git-send-email-gitter.spiros@gmail.com","threadId":"41148","inReplyTo":"1452251188-12939-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 09/10] t/t9001-send-email.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T11:06:27Z","receivedAt":"2016-01-08T11:06:27Z","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\nperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n t/t9001-send-email.sh | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 3c49536..05949a1 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -36,7 +36,7 @@ clean_fake_sendmail () {\n }\n \n test_expect_success $PREREQ 'Extract patches' '\n-\tpatches=`git format-patch -s --cc=\"One <one@example.com>\" --cc=two@example.com -n HEAD^1`\n+\tpatches=$(git format-patch -s --cc=\"One <one@example.com>\" --cc=two@example.com -n HEAD^1)\n '\n \n # Test no confirm early to ensure remaining tests will not hang\n@@ -1151,7 +1151,7 @@ test_expect_success $PREREQ '--no-bcc overrides sendemail.bcc' '\n '\n \n test_expect_success $PREREQ 'patches To headers are used by default' '\n-\tpatch=`git format-patch -1 --to=\"bodies@example.com\"` &&\n+\tpatch=$(git format-patch -1 --to=\"bodies@example.com\") &&\n \ttest_when_finished \"rm $patch\" &&\n \tgit send-email \\\n \t\t--dry-run \\\n@@ -1162,7 +1162,7 @@ test_expect_success $PREREQ 'patches To headers are used by default' '\n '\n \n test_expect_success $PREREQ 'patches To headers are appended to' '\n-\tpatch=`git format-patch -1 --to=\"bodies@example.com\"` &&\n+\tpatch=$(git format-patch -1 --to=\"bodies@example.com\") &&\n \ttest_when_finished \"rm $patch\" &&\n \tgit send-email \\\n \t\t--dry-run \\\n@@ -1175,8 +1175,8 @@ test_expect_success $PREREQ 'patches To headers are appended to' '\n '\n \n test_expect_success $PREREQ 'To headers from files reset each patch' '\n-\tpatch1=`git format-patch -1 --to=\"bodies@example.com\"` &&\n-\tpatch2=`git format-patch -1 --to=\"other@example.com\" HEAD~` &&\n+\tpatch1=$(git format-patch -1 --to=\"bodies@example.com\") &&\n+\tpatch2=$(git format-patch -1 --to=\"other@example.com\" HEAD~) &&\n \ttest_when_finished \"rm $patch1 && rm $patch2\" &&\n \tgit send-email \\\n \t\t--dry-run \\\n-- \n2.3.3.GIT\n"},{"id":"275538","messageId":"1452251188-12939-11-git-send-email-gitter.spiros@gmail.com","threadId":"41148","inReplyTo":"1452251188-12939-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 10/10] t/t9001-send-email.sh: get rid of unnecessary backquotes","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T11:06:28Z","receivedAt":"2016-01-08T11:06:28Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"Instead of making the shell expand 00* and invoke 'echo' with it,\nand then capturing its output as command substitution, just use\nthe result of expanding 00* directly.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n t/t9001-send-email.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 05949a1..bcbed38 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -1488,7 +1488,7 @@ test_cover_addresses () {\n \tclean_fake_sendmail &&\n \trm -fr outdir &&\n \tgit format-patch --cover-letter -2 -o outdir &&\n-\tcover=`echo outdir/0000-*.patch` &&\n+\tcover=\"outdir/0000-*.patch\" &&\n \tmv $cover cover-to-edit.patch &&\n \tperl -pe \"s/^From:/$header: extra\\@address.com\\nFrom:/\" cover-to-edit.patch >\"$cover\" &&\n \tgit send-email \\\n-- \n2.3.3.GIT\n"},{"id":"275551","messageId":"vpqa8ogdsyr.fsf@anie.imag.fr","threadId":"41148","inReplyTo":"1452251188-12939-11-git-send-email-gitter.spiros@gmail.com","subject":"Re: [PATCH 10/10] t/t9001-send-email.sh: get rid of unnecessary backquotes","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2016-01-08T14:52:12Z","receivedAt":"2016-01-08T14:52:12Z","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> Instead of making the shell expand 00* and invoke 'echo' with it,\n> and then capturing its output as command substitution, just use\n> the result of expanding 00* directly.\n\nThis is not actually how it happens. cover=`echo *` expands the * before\nthe assignment to $cover, while cover=\"*\" assigns a litteral * to\n$cover.\n\nThen, when you use $cover, the variable is expanded to * and then it is\nexpanded to filenames here:\n\n>  \tmv $cover cover-to-edit.patch &&\n\nOn the other hand, this instance of $cover is quoted, hence the\n*-expansion won't happen:\n\n>  \tperl -pe \"s/^From:/$header: extra\\@address.com\\nFrom:/\" cover-to-edit.patch >\"$cover\" &&\n\nSo, I believe this patch is not correct.\n\nOTOH, patches 1 to 9 look good to me.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"275566","messageId":"xmqq7fjk2b56.fsf@gitster.mtv.corp.google.com","threadId":"41148","inReplyTo":"vpqa8ogdsyr.fsf@anie.imag.fr","subject":"Re: [PATCH 10/10] t/t9001-send-email.sh: get rid of unnecessary backquotes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-08T18:12:37Z","receivedAt":"2016-01-08T18:12:37Z","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>> Instead of making the shell expand 00* and invoke 'echo' with it,\n>> and then capturing its output as command substitution, just use\n>> the result of expanding 00* directly.\n>\n> This is not actually how it happens. cover=`echo *` expands the * before\n> the assignment to $cover, while cover=\"*\" assigns a litteral * to\n> $cover.\n>\n> Then, when you use $cover, the variable is expanded to * and then it is\n> expanded to filenames here:\n>\n>>  \tmv $cover cover-to-edit.patch &&\n>\n> On the other hand, this instance of $cover is quoted, hence the\n> *-expansion won't happen:\n>\n>>  \tperl -pe \"s/^From:/$header: extra\\@address.com\\nFrom:/\" cover-to-edit.patch >\"$cover\" &&\n>\n> So, I believe this patch is not correct.\n\nI think this tried to mimick 6ffd3ec8 but the context covered by\nthat commit is different from the right hand side of an assignment.\n\nYou are right that [10/10] changes where the expansion happens and\nis not a faithful conversion.  The result may be the same, though ;-)\n\nIf anything, I think\n\n        -\tmv $cover cover-to-edit.patch &&\n        +\tmv \"$cover\" cover-to-edit.patch &&\n\nis a prudent thing to do, but that is orthogonal to what 10/10\ntried to do.\n\n>\n> OTOH, patches 1 to 9 look good to me.\n"},{"id":"275574","messageId":"56901714.60505@kdbg.org","threadId":"41148","inReplyTo":"1452251188-12939-11-git-send-email-gitter.spiros@gmail.com","subject":"Re: [PATCH 10/10] t/t9001-send-email.sh: get rid of unnecessary backquotes","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2016-01-08T20:07:48Z","receivedAt":"2016-01-08T20:07:48Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 08.01.2016 um 12:06 schrieb Elia Pinto:\n> Instead of making the shell expand 00* and invoke 'echo' with it,\n> and then capturing its output as command substitution, just use\n> the result of expanding 00* directly.\n>\n> Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>\n> ---\n>   t/t9001-send-email.sh | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n\nI notices there are two patches in this series that touch \nt/t9001-send-email.sh. The other one is 9/10, and it claims to be an \nautomated conversion. But that cannot be true because it would have \nremoved the backquotes that are addressed in this patch.\n\n>\n> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\n> index 05949a1..bcbed38 100755\n> --- a/t/t9001-send-email.sh\n> +++ b/t/t9001-send-email.sh\n> @@ -1488,7 +1488,7 @@ test_cover_addresses () {\n>   \tclean_fake_sendmail &&\n>   \trm -fr outdir &&\n>   \tgit format-patch --cover-letter -2 -o outdir &&\n> -\tcover=`echo outdir/0000-*.patch` &&\n\nThis expands the pattern and stores the result in $cover, provided there \nexists at least one file that matches the pattern. If such file does not \nexist, the pattern is stored verbatim in $cover.\n\n> +\tcover=\"outdir/0000-*.patch\" &&\n\nThis does not expand the pattern and stores the pattern verbatim in $cover.\n\n>   \tmv $cover cover-to-edit.patch &&\n\nThis line succeeds because there pattern is expanded and matches only \none file.\n\n>   \tperl -pe \"s/^From:/$header: extra\\@address.com\\nFrom:/\" cover-to-edit.patch >\"$cover\" &&\n\nIn this line, \"$cover\" is not expanded, and a file named '0000-*.patch' \nwill be dropped into subdirectory 'outdir'.\n\n>   \tgit send-email \\\n\nThe command that is truncated here looks like this:\n\n         git send-email \\\n                 --force \\\n                 --from=\"Example <nobody@example.com>\" \\\n                 --no-to --no-cc \\\n                 \"$@\" \\\n                 --smtp-server=\"$(pwd)/fake.sendmail\" \\\n                 outdir/0000-*.patch \\\n                 outdir/0001-*.patch \\\n                 outdir/0002-*.patch \\\n                 2>errors >out &&\n\nSince it uses a pattern that would match a the oddly named file and \nsince at this point the original 0000-whatever* file was moved away, the \npattern still matches only one 0000-* file. The test still succeeds, so \nyou did not notices that it has now slightly different behavior.\n\nAs much as I would like to remove a sub-process, I think it is better to \nkeep the $(echo 0000-*) in this case.\n"},{"id":"275580","messageId":"CA+EOSB=jVho9XCAG0Q3P6dvH6A99b5yB7FcyxkS3DtxupBeoFA@mail.gmail.com","threadId":"41148","inReplyTo":"vpqa8ogdsyr.fsf@anie.imag.fr","subject":"Re: [PATCH 10/10] t/t9001-send-email.sh: get rid of unnecessary backquotes","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T22:29:56Z","receivedAt":"2016-01-08T22:29:56Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"2016-01-08 15:52 GMT+01:00 Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>:\n> Elia Pinto <gitter.spiros@gmail.com> writes:\n>\n>> Instead of making the shell expand 00* and invoke 'echo' with it,\n>> and then capturing its output as command substitution, just use\n>> the result of expanding 00* directly.\n>\n> This is not actually how it happens. cover=`echo *` expands the * before\n> the assignment to $cover, while cover=\"*\" assigns a litteral * to\n> $cover.\n>\n> Then, when you use $cover, the variable is expanded to * and then it is\n> expanded to filenames here:\n>\n>>       mv $cover cover-to-edit.patch &&\n>\n> On the other hand, this instance of $cover is quoted, hence the\n> *-expansion won't happen:\n>\n>>       perl -pe \"s/^From:/$header: extra\\@address.com\\nFrom:/\" cover-to-edit.patch >\"$cover\" &&\n>\n> So, I believe this patch is not correct.\n>\n> OTOH, patches 1 to 9 look good to me.\n>\n\nYup. I am really sorry. I was not aware of the particular case,\ndespite having tested the patch.\n\nThanks for the review. Junio you kindly remove this patch?\n\nThank you all very much.\n\nSorry about the noise\n\nBest regards\n\n> --\n> Matthieu Moy\n> http://www-verimag.imag.fr/~moy/\n"},{"id":"275581","messageId":"xmqq4men1yuw.fsf@gitster.mtv.corp.google.com","threadId":"41148","inReplyTo":"CA+EOSB=jVho9XCAG0Q3P6dvH6A99b5yB7FcyxkS3DtxupBeoFA@mail.gmail.com","subject":"Re: [PATCH 10/10] t/t9001-send-email.sh: get rid of unnecessary backquotes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-08T22:37:59Z","receivedAt":"2016-01-08T22:37:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Elia Pinto <gitter.spiros@gmail.com> writes:\n\n> Thanks for the review. Junio you kindly remove this patch?\n>\n> Thank you all very much.\n\nDone, and thanks for working on this.  I am guessing that we are\nvery close to done, seeing that you now reached the t9xxx series?\n"},{"id":"275582","messageId":"CA+EOSBn7PwAJRZrORhk=2y84AwG978GGLR6ghp+=hkLHEu3YrQ@mail.gmail.com","threadId":"41148","inReplyTo":"xmqq4men1yuw.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 10/10] t/t9001-send-email.sh: get rid of unnecessary backquotes","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-08T23:19:16Z","receivedAt":"2016-01-08T23:19:16Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"2016-01-08 23:37 GMT+01:00 Junio C Hamano <gitster@pobox.com>:\n> Elia Pinto <gitter.spiros@gmail.com> writes:\n>\n>> Thanks for the review. Junio you kindly remove this patch?\n>>\n>> Thank you all very much.\n>\n> Done, and thanks for working on this.  I am guessing that we are\n> very close to done, seeing that you now reached the t9xxx series?\nYes,I've almost finished. Are missing aprox 22  patches,  in addition\nto incomplete ( and wrong ! ) patch  we have discussed but I have to\ncontrol them.\n\nBest Regards\n"}]}