git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes
@ 2014-03-25 17:22 Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution Elia Pinto
                   ` (89 more replies)
  0 siblings, 90 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto


This patch series changes everywhere the back-quotes construct for command
substitution with the $( ... ).  The Git CodingGuidelines prefer 
the $( ... ) construct for command substitution instead of using the back-quotes
, or grave accents (`..`).
    
The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell. Because this construct uses distinct
opening and closing delimiters, it is much easier to follow. 
Also now the embedded double quotes no longer need escaping.

The patch is simple but involves a large number of files with different authors. 
Being simple I think it is wasteful to cc a large number of different people
for doing a review. 

This is a second reroll after the 
Matthieu Moy review. Changes from v1:

- Dropped the silly patches to t6111-rev-list-treesame.sh, 
  t0204-gettext-reencode-sanity.sh.

- Simple reformatting of the commit message.

- added the toy script used for doing the patch.

Elia Pinto (142):
  check-builtins.sh: use the $( ... ) construct for command
    substitution
  git-am.sh: use the $( ... ) construct for command substitution
  git-pull.sh: use the $( ... ) construct for command substitution
  git-rebase--merge.sh: use the $( ... ) construct for command
    substitution
  git-rebase.sh: use the $( ... ) construct for command substitution
  git-stash.sh: use the $( ... ) construct for command substitution
  git-web--browse.sh: use the $( ... ) construct for command
    substitution
  unimplemented.sh: use the $( ... ) construct for command substitution
  t0001-init.sh: use the $( ... ) construct for command substitution
  t0010-racy-git.sh: use the $( ... ) construct for command
    substitution
  t0020-crlf.sh: use the $( ... ) construct for command substitution
  t0025-crlf-auto.sh: use the $( ... ) construct for command
    substitution
  t0026-eol-config.sh: use the $( ... ) construct for command
    substitution
  t0030-stripspace.sh: use the $( ... ) construct for command
    substitution
  t0300-credentials.sh: use the $( ... ) construct for command
    substitution
  t1000-read-tree-m-3way.sh: use the $( ... ) construct for command
    substitution
  t1001-read-tree-m-2way.sh: use the $( ... ) construct for command
    substitution
  t1002-read-tree-m-u-2way.sh: use the $( ... ) construct for command
    substitution
  t1003-read-tree-prefix.sh: use the $( ... ) construct for command
    substitution
  t1004-read-tree-m-u-wf.sh: use the $( ... ) construct for command
    substitution
  t1020-subdirectory.sh: use the $( ... ) construct for command
    substitution
  t1050-large.sh: use the $( ... ) construct for command substitution
  t1100-commit-tree-options.sh: use the $( ... ) construct for command
    substitution
  t1401-symbolic-ref.sh: use the $( ... ) construct for command
    substitution
  t1410-reflog.sh: use the $( ... ) construct for command substitution
  t1511-rev-parse-caret.sh: use the $( ... ) construct for command
    substitution
  t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for
    command substitution
  t2102-update-index-symlinks.sh: use the $( ... ) construct for
    command substitution
  t3030-merge-recursive.sh: use the $( ... ) construct for command
    substitution
  t3100-ls-tree-restrict.sh: use the $( ... ) construct for command
    substitution
  t3101-ls-tree-dirname.sh: use the $( ... ) construct for command
    substitution
  t3210-pack-refs.sh: use the $( ... ) construct for command
    substitution
  t3403-rebase-skip.sh: use the $( ... ) construct for command
    substitution
  t3511-cherry-pick-x.sh: use the $( ... ) construct for command
    substitution
  t3600-rm.sh: use the $( ... ) construct for command substitution
  t3700-add.sh: use the $( ... ) construct for command substitution
  t3905-stash-include-untracked.sh: use the $( ... ) construct for
    command substitution
  t3910-mac-os-precompose.sh: use the $( ... ) construct for command
    substitution
  t4006-diff-mode.sh: use the $( ... ) construct for command
    substitution
  t4010-diff-pathspec.sh: use the $( ... ) construct for command
    substitution
  t4012-diff-binary.sh: use the $( ... ) construct for command
    substitution
  t4013-diff-various.sh: use the $( ... ) construct for command
    substitution
  t4014-format-patch.sh: use the $( ... ) construct for command
    substitution
  t4036-format-patch-signer-mime.sh: use the $( ... ) construct for
    command substitution
  t4038-diff-combined.sh: use the $( ... ) construct for command
    substitution
  t4057-diff-combined-paths.sh: use the $( ... ) construct for command
    substitution
  t4116-apply-reverse.sh: use the $( ... ) construct for command
    substitution
  t4119-apply-config.sh: use the $( ... ) construct for command
    substitution
  t4204-patch-id.sh: use the $( ... ) construct for command
    substitution
  t5000-tar-tree.sh: use the $( ... ) construct for command
    substitution
  t5003-archive-zip.sh: use the $( ... ) construct for command
    substitution
  t5100-mailinfo.sh: use the $( ... ) construct for command
    substitution
  t5300-pack-object.sh: use the $( ... ) construct for command
    substitution
  t5301-sliding-window.sh: use the $( ... ) construct for command
    substitution
  t5302-pack-index.sh: use the $( ... ) construct for command
    substitution
  t5303-pack-corruption-resilience.sh: use the $( ... ) construct for
    command substitution
  t5304-prune.sh: use the $( ... ) construct for command substitution
  t5305-include-tag.sh: use the $( ... ) construct for command
    substitution
  t5500-fetch-pack.sh: use the $( ... ) construct for command
    substitution
  t5505-remote.sh: use the $( ... ) construct for command substitution
  t5506-remote-groups.sh: use the $( ... ) construct for command
    substitution
  t5510-fetch.sh: use the $( ... ) construct for command substitution
  t5515-fetch-merge-logic.sh: use the $( ... ) construct for command
    substitution
  t5516-fetch-push.sh: use the $( ... ) construct for command
    substitution
  t5517-push-mirror.sh: use the $( ... ) construct for command
    substitution
  t5520-pull.sh: use the $( ... ) construct for command substitution
  t5522-pull-symlink.sh: use the $( ... ) construct for command
    substitution
  t5530-upload-pack-error.sh: use the $( ... ) construct for command
    substitution
  t5537-fetch-shallow.sh: use the $( ... ) construct for command
    substitution
  t5538-push-shallow.sh: use the $( ... ) construct for command
    substitution
  t5550-http-fetch-dumb.sh: use the $( ... ) construct for command
    substitution
  t5551-http-fetch-smart.sh: use the $( ... ) construct for command
    substitution
  t5570-git-daemon.sh: use the $( ... ) construct for command
    substitution
  t5601-clone.sh: use the $( ... ) construct for command substitution
  t5700-clone-reference.sh: use the $( ... ) construct for command
    substitution
  t5710-info-alternate.sh: use the $( ... ) construct for command
    substitution
  t5900-repo-selection.sh: use the $( ... ) construct for command
    substitution
  t6001-rev-list-graft.sh: use the $( ... ) construct for command
    substitution
  t6002-rev-list-bisect.sh: use the $( ... ) construct for command
    substitution
  t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for
    command substitution
  t6032-merge-large-rename.sh: use the $( ... ) construct for command
    substitution
  t6034-merge-rename-nocruft.sh: use the $( ... ) construct for command
    substitution
  t6132-pathspec-exclude.sh: use the $( ... ) construct for command
    substitution
  t7001-mv.sh: use the $( ... ) construct for command substitution
  t7003-filter-branch.sh: use the $( ... ) construct for command
    substitution
  t7004-tag.sh: use the $( ... ) construct for command substitution
  t7006-pager.sh: use the $( ... ) construct for command substitution
  t7103-reset-bare.sh: use the $( ... ) construct for command
    substitution
  t7406-submodule-update.sh: use the $( ... ) construct for command
    substitution
  t7408-submodule-reference.sh: use the $( ... ) construct for command
    substitution
  t7504-commit-msg-hook.sh: use the $( ... ) construct for command
    substitution
  t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for
    command substitution
  t7602-merge-octopus-many.sh: use the $( ... ) construct for command
    substitution
  t7700-repack.sh: use the $( ... ) construct for command substitution
  t8003-blame-corner-cases.sh: use the $( ... ) construct for command
    substitution
  t9001-send-email.sh: use the $( ... ) construct for command
    substitution
  t9101-git-svn-props.sh: use the $( ... ) construct for command
    substitution
  t9104-git-svn-follow-parent.sh: use the $( ... ) construct for
    command substitution
  t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command
    substitution
  t9107-git-svn-migrate.sh: use the $( ... ) construct for command
    substitution
  t9108-git-svn-glob.sh: use the $( ... ) construct for command
    substitution
  t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command
    substitution
  t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for
    command substitution
  t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for
    command substitution
  t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct for
    command substitution
  t9119-git-svn-info.sh: use the $( ... ) construct for command
    substitution
  t9129-git-svn-i18n-commitencoding.sh: use the $( ... ) construct for
    command substitution
  t9130-git-svn-authors-file.sh: use the $( ... ) construct for command
    substitution
  t9132-git-svn-broken-symlink.sh: use the $( ... ) construct for
    command substitution
  t9137-git-svn-dcommit-clobber-series.sh: use the $( ... ) construct
    for command substitution
  t9138-git-svn-authors-prog.sh: use the $( ... ) construct for command
    substitution
  t9145-git-svn-master-branch.sh: use the $( ... ) construct for
    command substitution
  t9150-svk-mergetickets.sh: use the $( ... ) construct for command
    substitution
  t9300-fast-import.sh: use the $( ... ) construct for command
    substitution
  t9350-fast-export.sh: use the $( ... ) construct for command
    substitution
  t9501-gitweb-standalone-http-status.sh: use the $( ... ) construct
    for command substitution
  t9901-git-web--browse.sh: use the $( ... ) construct for command
    substitution
  test-lib-functions.sh: use the $( ... ) construct for command
    substitution
  lib-credential.sh: use the $( ... ) construct for command
    substitution
  lib-cvs.sh: use the $( ... ) construct for command substitution
  lib-gpg.sh: use the $( ... ) construct for command substitution
  p5302-pack-index.sh: use the $( ... ) construct for command
    substitution
  howto-index.sh: use the $( ... ) construct for command substitution
  install-webdoc.sh: use the $( ... ) construct for command
    substitution
  git-checkout.sh: use the $( ... ) construct for command substitution
  git-clone.sh: use the $( ... ) construct for command substitution
  git-commit.sh: use the $( ... ) construct for command substitution
  git-fetch.sh: use the $( ... ) construct for command substitution
  git-ls-remote.sh: use the $( ... ) construct for command substitution
  git-merge.sh: use the $( ... ) construct for command substitution
  git-repack.sh: use the $( ... ) construct for command substitution
  git-resolve.sh: use the $( ... ) construct for command substitution
  git-revert.sh: use the $( ... ) construct for command substitution
  git-tag.sh: use the $( ... ) construct for command substitution
  t9360-mw-to-git-clone.sh: use the $( ... ) construct for command
    substitution
  t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command
    substitution
  t9365-continuing-queries.sh: use the $( ... ) construct for command
    substitution
  test-gitmw-lib.sh: use the $( ... ) construct for command
    substitution
  t7900-subtree.sh: use the $( ... ) construct for command substitution
  appp.sh: use the $( ... ) construct for command substitution
  txt-to-pot.sh: use the $( ... ) construct for command substitution
  t9100-git-svn-basic.sh: use the $( ... ) construct for command
    substitution

 Documentation/howto-index.sh                    |   12 ++--
 Documentation/install-webdoc.sh                 |    6 +-
 check-builtins.sh                               |    4 +-
 contrib/examples/git-checkout.sh                |    8 +--
 contrib/examples/git-clone.sh                   |   20 +++----
 contrib/examples/git-commit.sh                  |   10 ++--
 contrib/examples/git-fetch.sh                   |    6 +-
 contrib/examples/git-ls-remote.sh               |    4 +-
 contrib/examples/git-merge.sh                   |    4 +-
 contrib/examples/git-repack.sh                  |    2 +-
 contrib/examples/git-resolve.sh                 |    2 +-
 contrib/examples/git-revert.sh                  |    2 +-
 contrib/examples/git-tag.sh                     |    2 +-
 contrib/mw-to-git/t/t9360-mw-to-git-clone.sh    |   14 ++---
 contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh     |    4 +-
 contrib/mw-to-git/t/t9365-continuing-queries.sh |    2 +-
 contrib/mw-to-git/t/test-gitmw-lib.sh           |    6 +-
 contrib/subtree/t/t7900-subtree.sh              |    2 +-
 contrib/thunderbird-patch-inline/appp.sh        |   14 ++---
 git-am.sh                                       |   30 +++++-----
 git-gui/po/glossary/txt-to-pot.sh               |    4 +-
 git-pull.sh                                     |    2 +-
 git-rebase--merge.sh                            |    4 +-
 git-rebase.sh                                   |    8 +--
 git-stash.sh                                    |    2 +-
 git-web--browse.sh                              |    6 +-
 t/lib-credential.sh                             |    2 +-
 t/lib-cvs.sh                                    |    2 +-
 t/lib-gpg.sh                                    |    2 +-
 t/perf/p5302-pack-index.sh                      |    2 +-
 t/t0001-init.sh                                 |   12 ++--
 t/t0010-racy-git.sh                             |    4 +-
 t/t0020-crlf.sh                                 |   42 +++++++-------
 t/t0025-crlf-auto.sh                            |   38 ++++++-------
 t/t0026-eol-config.sh                           |   20 +++----
 t/t0030-stripspace.sh                           |   20 +++----
 t/t0300-credentials.sh                          |    2 +-
 t/t1000-read-tree-m-3way.sh                     |    4 +-
 t/t1001-read-tree-m-2way.sh                     |   18 +++---
 t/t1002-read-tree-m-u-2way.sh                   |   10 ++--
 t/t1003-read-tree-prefix.sh                     |    2 +-
 t/t1004-read-tree-m-u-wf.sh                     |    8 +--
 t/t1020-subdirectory.sh                         |   22 ++++----
 t/t1050-large.sh                                |    4 +-
 t/t1100-commit-tree-options.sh                  |    4 +-
 t/t1401-symbolic-ref.sh                         |    2 +-
 t/t1410-reflog.sh                               |   24 ++++----
 t/t1511-rev-parse-caret.sh                      |    4 +-
 t/t1512-rev-parse-disambiguation.sh             |    8 +--
 t/t2102-update-index-symlinks.sh                |    2 +-
 t/t3030-merge-recursive.sh                      |    2 +-
 t/t3100-ls-tree-restrict.sh                     |    2 +-
 t/t3101-ls-tree-dirname.sh                      |    2 +-
 t/t3210-pack-refs.sh                            |    2 +-
 t/t3403-rebase-skip.sh                          |    2 +-
 t/t3511-cherry-pick-x.sh                        |   14 ++---
 t/t3600-rm.sh                                   |    4 +-
 t/t3700-add.sh                                  |   16 +++---
 t/t3905-stash-include-untracked.sh              |    4 +-
 t/t3910-mac-os-precompose.sh                    |   16 +++---
 t/t4006-diff-mode.sh                            |    2 +-
 t/t4010-diff-pathspec.sh                        |    4 +-
 t/t4012-diff-binary.sh                          |   16 +++---
 t/t4013-diff-various.sh                         |    6 +-
 t/t4014-format-patch.sh                         |   10 ++--
 t/t4036-format-patch-signer-mime.sh             |    2 +-
 t/t4038-diff-combined.sh                        |    2 +-
 t/t4057-diff-combined-paths.sh                  |    2 +-
 t/t4116-apply-reverse.sh                        |   12 ++--
 t/t4119-apply-config.sh                         |    2 +-
 t/t4204-patch-id.sh                             |    4 +-
 t/t5000-tar-tree.sh                             |    6 +-
 t/t5003-archive-zip.sh                          |    2 +-
 t/t5100-mailinfo.sh                             |   12 ++--
 t/t5300-pack-object.sh                          |   18 +++---
 t/t5301-sliding-window.sh                       |   14 ++---
 t/t5302-pack-index.sh                           |   34 ++++++------
 t/t5303-pack-corruption-resilience.sh           |    8 +--
 t/t5304-prune.sh                                |    2 +-
 t/t5305-include-tag.sh                          |    8 +--
 t/t5500-fetch-pack.sh                           |   16 +++---
 t/t5505-remote.sh                               |    2 +-
 t/t5506-remote-groups.sh                        |    2 +-
 t/t5510-fetch.sh                                |   10 ++--
 t/t5515-fetch-merge-logic.sh                    |    4 +-
 t/t5516-fetch-push.sh                           |    4 +-
 t/t5517-push-mirror.sh                          |    2 +-
 t/t5520-pull.sh                                 |   10 ++--
 t/t5522-pull-symlink.sh                         |    2 +-
 t/t5530-upload-pack-error.sh                    |    2 +-
 t/t5537-fetch-shallow.sh                        |    4 +-
 t/t5538-push-shallow.sh                         |    4 +-
 t/t5550-http-fetch-dumb.sh                      |    8 +--
 t/t5551-http-fetch-smart.sh                     |    2 +-
 t/t5570-git-daemon.sh                           |    8 +--
 t/t5601-clone.sh                                |    2 +-
 t/t5700-clone-reference.sh                      |    2 +-
 t/t5710-info-alternate.sh                       |    2 +-
 t/t5900-repo-selection.sh                       |    2 +-
 t/t6001-rev-list-graft.sh                       |   12 ++--
 t/t6002-rev-list-bisect.sh                      |    6 +-
 t/t6015-rev-list-show-all-parents.sh            |    6 +-
 t/t6032-merge-large-rename.sh                   |    2 +-
 t/t6034-merge-rename-nocruft.sh                 |    2 +-
 t/t6132-pathspec-exclude.sh                     |    2 +-
 t/t7001-mv.sh                                   |    4 +-
 t/t7003-filter-branch.sh                        |    6 +-
 t/t7004-tag.sh                                  |   16 +++---
 t/t7006-pager.sh                                |    2 +-
 t/t7103-reset-bare.sh                           |    2 +-
 t/t7406-submodule-update.sh                     |    4 +-
 t/t7408-submodule-reference.sh                  |    2 +-
 t/t7504-commit-msg-hook.sh                      |    2 +-
 t/t7505-prepare-commit-msg-hook.sh              |   32 +++++------
 t/t7602-merge-octopus-many.sh                   |    8 +--
 t/t7700-repack.sh                               |    4 +-
 t/t8003-blame-corner-cases.sh                   |    4 +-
 t/t9001-send-email.sh                           |   10 ++--
 t/t9100-git-svn-basic.sh                        |   24 ++++----
 t/t9101-git-svn-props.sh                        |   30 +++++-----
 t/t9104-git-svn-follow-parent.sh                |   48 ++++++++--------
 t/t9105-git-svn-commit-diff.sh                  |    4 +-
 t/t9107-git-svn-migrate.sh                      |   16 +++---
 t/t9108-git-svn-glob.sh                         |   20 +++----
 t/t9109-git-svn-multi-glob.sh                   |   32 +++++------
 t/t9110-git-svn-use-svm-props.sh                |    2 +-
 t/t9114-git-svn-dcommit-merge.sh                |   12 ++--
 t/t9118-git-svn-funky-branch-names.sh           |    2 +-
 t/t9119-git-svn-info.sh                         |    2 +-
 t/t9129-git-svn-i18n-commitencoding.sh          |    4 +-
 t/t9130-git-svn-authors-file.sh                 |   12 ++--
 t/t9132-git-svn-broken-symlink.sh               |    4 +-
 t/t9137-git-svn-dcommit-clobber-series.sh       |   24 ++++----
 t/t9138-git-svn-authors-prog.sh                 |    2 +-
 t/t9145-git-svn-master-branch.sh                |    4 +-
 t/t9150-svk-mergetickets.sh                     |    2 +-
 t/t9300-fast-import.sh                          |   68 +++++++++++------------
 t/t9350-fast-export.sh                          |    6 +-
 t/t9501-gitweb-standalone-http-status.sh        |    6 +-
 t/t9901-git-web--browse.sh                      |    2 +-
 t/test-lib-functions.sh                         |    8 +--
 unimplemented.sh                                |    2 +-
 142 files changed, 609 insertions(+), 609 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 101+ messages in thread

* [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 19:57   ` Junio C Hamano
  2014-03-26  6:57   ` Matthieu Moy
  2014-03-25 17:22 ` [PATCH v2 002/142] git-am.sh: " Elia Pinto
                   ` (88 subsequent siblings)
  89 siblings, 2 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 check-builtins.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/check-builtins.sh b/check-builtins.sh
index d6fe6cf..07cff69 100755
--- a/check-builtins.sh
+++ b/check-builtins.sh
@@ -14,8 +14,8 @@ sort |
     bad=0
     while read builtin
     do
-	base=`expr "$builtin" : 'git-\(.*\)'`
-	x=`sed -ne 's/.*{ "'$base'", \(cmd_[^, ]*\).*/'$base'	\1/p' git.c`
+	base=$(expr "$builtin" : 'git-\(.*\)')
+	x=$(sed -ne 's/.*{ "'$base'", \(cmd_[^, ]*\).*/'$base'	\1/p' git.c)
 	if test -z "$x"
 	then
 		echo "$base is builtin but not listed in git.c command list"
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 002/142] git-am.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 003/142] git-pull.sh: " Elia Pinto
                   ` (87 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-am.sh |   30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 78517f2..1b638e8 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -125,7 +125,7 @@ cannot_fallback () {
 }
 
 fall_back_3way () {
-    O_OBJECT=`cd "$GIT_OBJECT_DIRECTORY" && pwd`
+    O_OBJECT=$(cd "$GIT_OBJECT_DIRECTORY" && pwd)
 
     rm -fr "$dotest"/patch-merge-*
     mkdir "$dotest/patch-merge-tmp-dir"
@@ -275,7 +275,7 @@ split_patches () {
 		then
 			clean_abort "$(gettext "Only one StGIT patch series can be applied at once")"
 		fi
-		series_dir=`dirname "$1"`
+		series_dir=$(dirname "$1")
 		series_file="$1"
 		shift
 		{
@@ -298,8 +298,8 @@ split_patches () {
 		this=0
 		for stgit in "$@"
 		do
-			this=`expr "$this" + 1`
-			msgnum=`printf "%0${prec}d" $this`
+			this=$(expr "$this" + 1)
+			msgnum=$(printf "%0${prec}d" $this)
 			# Perl version of StGIT parse_patch. The first nonemptyline
 			# not starting with Author, From or Date is the
 			# subject, and the body starts with the next nonempty
@@ -644,26 +644,26 @@ fi
 git_apply_opt=$(cat "$dotest/apply-opt")
 if test "$(cat "$dotest/sign")" = t
 then
-	SIGNOFF=`git var GIT_COMMITTER_IDENT | sed -e '
+	SIGNOFF=$(git var GIT_COMMITTER_IDENT | sed -e '
 			s/>.*/>/
 			s/^/Signed-off-by: /'
-		`
+		)
 else
 	SIGNOFF=
 fi
 
-last=`cat "$dotest/last"`
-this=`cat "$dotest/next"`
+last=$(cat "$dotest/last")
+this=$(cat "$dotest/next")
 if test "$skip" = t
 then
-	this=`expr "$this" + 1`
+	this=$(expr "$this" + 1)
 	resume=
 fi
 
 while test "$this" -le "$last"
 do
-	msgnum=`printf "%0${prec}d" $this`
-	next=`expr "$this" + 1`
+	msgnum=$(printf "%0${prec}d" $this)
+	next=$(expr "$this" + 1)
 	test -f "$dotest/$msgnum" || {
 		resume=
 		go_next
@@ -739,16 +739,16 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."
 	'')
 	    if test '' != "$SIGNOFF"
 	    then
-		LAST_SIGNED_OFF_BY=`
+		LAST_SIGNED_OFF_BY=$(
 		    sed -ne '/^Signed-off-by: /p' \
 		    "$dotest/msg-clean" |
 		    sed -ne '$p'
-		`
-		ADD_SIGNOFF=`
+		)
+		ADD_SIGNOFF=$(
 		    test "$LAST_SIGNED_OFF_BY" = "$SIGNOFF" || {
 		    test '' = "$LAST_SIGNED_OFF_BY" && echo
 		    echo "$SIGNOFF"
-		}`
+		})
 	    else
 		ADD_SIGNOFF=
 	    fi
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 003/142] git-pull.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 002/142] git-am.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 004/142] git-rebase--merge.sh: " Elia Pinto
                   ` (86 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-pull.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-pull.sh b/git-pull.sh
index 6cd8ebc..cfc589d 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -108,7 +108,7 @@ do
 	-s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)
 		case "$#,$1" in
 		*,*=*)
-			strategy=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;;
+			strategy=$(expr "z$1" : 'z-[^=]*=\(.*\)') ;;
 		1,*)
 			usage ;;
 		*)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 004/142] git-rebase--merge.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (2 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 003/142] git-pull.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 005/142] git-rebase.sh: " Elia Pinto
                   ` (85 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-rebase--merge.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh
index 5381857..dc064f8 100644
--- a/git-rebase--merge.sh
+++ b/git-rebase--merge.sh
@@ -24,7 +24,7 @@ continue_merge () {
 		die "$resolvemsg"
 	fi
 
-	cmt=`cat "$state_dir/current"`
+	cmt=$(cat "$state_dir/current")
 	if ! git diff-index --quiet --ignore-submodules HEAD --
 	then
 		if ! git commit ${gpg_sign_opt:+"$gpg_sign_opt"} --no-verify -C "$cmt"
@@ -132,7 +132,7 @@ echo "$onto_name" > "$state_dir/onto_name"
 write_basic_state
 
 msgnum=0
-for cmt in `git rev-list --reverse --no-merges "$revisions"`
+for cmt in $(git rev-list --reverse --no-merges "$revisions")
 do
 	msgnum=$(($msgnum + 1))
 	echo "$cmt" > "$state_dir/cmt.$msgnum"
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 005/142] git-rebase.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (3 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 004/142] git-rebase--merge.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 006/142] git-stash.sh: " Elia Pinto
                   ` (84 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-rebase.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index 5f6732b..a209ab9 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -462,8 +462,8 @@ then
 else
 	if test -z "$onto"
 	then
-		empty_tree=`git hash-object -t tree /dev/null`
-		onto=`git commit-tree $empty_tree </dev/null`
+		empty_tree=$(git hash-object -t tree /dev/null)
+		onto=$(git commit-tree $empty_tree </dev/null)
 		squash_onto="$onto"
 	fi
 	unset upstream_name
@@ -521,10 +521,10 @@ case "$#" in
 	;;
 0)
 	# Do not need to switch branches, we are already on it.
-	if branch_name=`git symbolic-ref -q HEAD`
+	if branch_name=$(git symbolic-ref -q HEAD)
 	then
 		head_name=$branch_name
-		branch_name=`expr "z$branch_name" : 'zrefs/heads/\(.*\)'`
+		branch_name=$(expr "z$branch_name" : 'zrefs/heads/\(.*\)')
 	else
 		head_name="detached HEAD"
 		branch_name=HEAD ;# detached
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 006/142] git-stash.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (4 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 005/142] git-rebase.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 007/142] git-web--browse.sh: " Elia Pinto
                   ` (83 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-stash.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-stash.sh b/git-stash.sh
index 4798bcf..af549c7 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -13,7 +13,7 @@ USAGE="list [<options>]
 
 SUBDIRECTORY_OK=Yes
 OPTIONS_SPEC=
-START_DIR=`pwd`
+START_DIR=$(pwd)
 . git-sh-setup
 . git-sh-i18n
 require_work_tree
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 007/142] git-web--browse.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (5 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 006/142] git-stash.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 008/142] unimplemented.sh: " Elia Pinto
                   ` (82 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-web--browse.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-web--browse.sh b/git-web--browse.sh
index ebdfba6..ae15253 100755
--- a/git-web--browse.sh
+++ b/git-web--browse.sh
@@ -59,7 +59,7 @@ do
 	-b|--browser*|-t|--tool*)
 		case "$#,$1" in
 		*,*=*)
-			browser=`expr "z$1" : 'z-[^=]*=\(.*\)'`
+			browser=$(expr "z$1" : 'z-[^=]*=\(.*\)')
 			;;
 		1,*)
 			usage ;;
@@ -71,7 +71,7 @@ do
 	-c|--config*)
 		case "$#,$1" in
 		*,*=*)
-			conf=`expr "z$1" : 'z-[^=]*=\(.*\)'`
+			conf=$(expr "z$1" : 'z-[^=]*=\(.*\)')
 			;;
 		1,*)
 			usage ;;
@@ -100,7 +100,7 @@ then
 	for opt in "$conf" "web.browser"
 	do
 		test -z "$opt" && continue
-		browser="`git config $opt`"
+		browser="$(git config $opt)"
 		test -z "$browser" || break
 	done
 	if test -n "$browser" && ! valid_tool "$browser"; then
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 008/142] unimplemented.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (6 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 007/142] git-web--browse.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 009/142] t0001-init.sh: " Elia Pinto
                   ` (81 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 unimplemented.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/unimplemented.sh b/unimplemented.sh
index 5252de4..fee21d2 100644
--- a/unimplemented.sh
+++ b/unimplemented.sh
@@ -1,4 +1,4 @@
 #!/bin/sh
 
-echo >&2 "fatal: git was built without support for `basename $0` (@@REASON@@)."
+echo >&2 "fatal: git was built without support for $(basename $0) (@@REASON@@)."
 exit 128
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 009/142] t0001-init.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (7 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 008/142] unimplemented.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 20:02   ` Junio C Hamano
  2014-03-25 17:22 ` [PATCH v2 010/142] t0010-racy-git.sh: " Elia Pinto
                   ` (80 subsequent siblings)
  89 siblings, 1 reply; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0001-init.sh |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 9fb582b..32821fe 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -250,7 +250,7 @@ test_expect_success 'init --bare/--shared overrides system/global config' '
 	) &&
 	check_config init-bare-shared-override true unset &&
 	test x0666 = \
-	x`git config -f init-bare-shared-override/config core.sharedRepository`
+	x$(git config -f init-bare-shared-override/config core.sharedRepository)
 '
 
 test_expect_success 'init honors global core.sharedRepository' '
@@ -262,7 +262,7 @@ test_expect_success 'init honors global core.sharedRepository' '
 		git init
 	) &&
 	test x0666 = \
-	x`git config -f shared-honor-global/.git/config core.sharedRepository`
+	x$(git config -f shared-honor-global/.git/config core.sharedRepository)
 '
 
 test_expect_success 'init rejects insanely long --template' '
@@ -374,7 +374,7 @@ test_expect_success 'init prefers command line to GIT_DIR' '
 test_expect_success 'init with separate gitdir' '
 	rm -rf newdir &&
 	git init --separate-git-dir realgitdir newdir &&
-	echo "gitdir: `pwd`/realgitdir" >expected &&
+	echo "gitdir: $(pwd)/realgitdir" >expected &&
 	test_cmp expected newdir/.git &&
 	test -d realgitdir/refs
 '
@@ -388,7 +388,7 @@ test_expect_success 're-init to update git link' '
 	cd newdir &&
 	git init --separate-git-dir ../surrealgitdir
 	) &&
-	echo "gitdir: `pwd`/surrealgitdir" >expected &&
+	echo "gitdir: $(pwd)/surrealgitdir" >expected &&
 	test_cmp expected newdir/.git &&
 	test -d surrealgitdir/refs &&
 	! test -d realgitdir/refs
@@ -401,7 +401,7 @@ test_expect_success 're-init to move gitdir' '
 	cd newdir &&
 	git init --separate-git-dir ../realgitdir
 	) &&
-	echo "gitdir: `pwd`/realgitdir" >expected &&
+	echo "gitdir: $(pwd)/realgitdir" >expected &&
 	test_cmp expected newdir/.git &&
 	test -d realgitdir/refs
 '
@@ -415,7 +415,7 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
 	ln -s here .git &&
 	git init --separate-git-dir ../realgitdir
 	) &&
-	echo "gitdir: `pwd`/realgitdir" >expected &&
+	echo "gitdir: $(pwd)/realgitdir" >expected &&
 	test_cmp expected newdir/.git &&
 	test -d realgitdir/refs &&
 	! test -d newdir/here
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 010/142] t0010-racy-git.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (8 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 009/142] t0001-init.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 011/142] t0020-crlf.sh: " Elia Pinto
                   ` (79 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0010-racy-git.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t0010-racy-git.sh b/t/t0010-racy-git.sh
index e45a9e4..5657c5a 100755
--- a/t/t0010-racy-git.sh
+++ b/t/t0010-racy-git.sh
@@ -14,7 +14,7 @@ do
 	git update-index --add infocom
 	echo xyzzy >infocom
 
-	files=`git diff-files -p`
+	files=$(git diff-files -p)
 	test_expect_success \
 	"Racy GIT trial #$trial part A" \
 	'test "" != "$files"'
@@ -23,7 +23,7 @@ do
 	echo xyzzy >cornerstone
 	git update-index --add cornerstone
 
-	files=`git diff-files -p`
+	files=$(git diff-files -p)
 	test_expect_success \
 	"Racy GIT trial #$trial part B" \
 	'test "" != "$files"'
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 011/142] t0020-crlf.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (9 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 010/142] t0010-racy-git.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 012/142] t0025-crlf-auto.sh: " Elia Pinto
                   ` (78 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0020-crlf.sh |   42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index e526184..d2e51a8 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -20,14 +20,14 @@ test_expect_success setup '
 
 	git commit -m initial &&
 
-	one=`git rev-parse HEAD:one` &&
-	dir=`git rev-parse HEAD:dir` &&
-	two=`git rev-parse HEAD:dir/two` &&
-	three=`git rev-parse HEAD:three` &&
+	one=$(git rev-parse HEAD:one) &&
+	dir=$(git rev-parse HEAD:dir) &&
+	two=$(git rev-parse HEAD:dir/two) &&
+	three=$(git rev-parse HEAD:three) &&
 
 	for w in Some extra lines here; do echo $w; done >>one &&
 	git diff >patch.file &&
-	patched=`git hash-object --stdin <one` &&
+	patched=$(git hash-object --stdin <one) &&
 	git read-tree --reset -u HEAD &&
 
 	echo happy.
@@ -111,7 +111,7 @@ test_expect_success 'update with autocrlf=input' '
 		}
 	done &&
 
-	differs=`git diff-index --cached HEAD` &&
+	differs=$(git diff-index --cached HEAD) &&
 	test -z "$differs" || {
 		echo Oops "$differs"
 		false
@@ -135,7 +135,7 @@ test_expect_success 'update with autocrlf=true' '
 		}
 	done &&
 
-	differs=`git diff-index --cached HEAD` &&
+	differs=$(git diff-index --cached HEAD) &&
 	test -z "$differs" || {
 		echo Oops "$differs"
 		false
@@ -158,9 +158,9 @@ test_expect_success 'checkout with autocrlf=true' '
 			break
 		}
 	done &&
-	test "$one" = `git hash-object --stdin <one` &&
-	test "$two" = `git hash-object --stdin <dir/two` &&
-	differs=`git diff-index --cached HEAD` &&
+	test "$one" = $(git hash-object --stdin <one) &&
+	test "$two" = $(git hash-object --stdin <dir/two) &&
+	differs=$(git diff-index --cached HEAD) &&
 	test -z "$differs" || {
 		echo Oops "$differs"
 		false
@@ -184,9 +184,9 @@ test_expect_success 'checkout with autocrlf=input' '
 			git update-index -- $f
 		fi
 	done &&
-	test "$one" = `git hash-object --stdin <one` &&
-	test "$two" = `git hash-object --stdin <dir/two` &&
-	differs=`git diff-index --cached HEAD` &&
+	test "$one" = $(git hash-object --stdin <one) &&
+	test "$two" = $(git hash-object --stdin <dir/two) &&
+	differs=$(git diff-index --cached HEAD) &&
 	test -z "$differs" || {
 		echo Oops "$differs"
 		false
@@ -200,7 +200,7 @@ test_expect_success 'apply patch (autocrlf=input)' '
 	git read-tree --reset -u HEAD &&
 
 	git apply patch.file &&
-	test "$patched" = "`git hash-object --stdin <one`" || {
+	test "$patched" = "$(git hash-object --stdin <one)" || {
 		echo "Eh?  apply without index"
 		false
 	}
@@ -213,7 +213,7 @@ test_expect_success 'apply patch --cached (autocrlf=input)' '
 	git read-tree --reset -u HEAD &&
 
 	git apply --cached patch.file &&
-	test "$patched" = `git rev-parse :one` || {
+	test "$patched" = $(git rev-parse :one) || {
 		echo "Eh?  apply with --cached"
 		false
 	}
@@ -226,8 +226,8 @@ test_expect_success 'apply patch --index (autocrlf=input)' '
 	git read-tree --reset -u HEAD &&
 
 	git apply --index patch.file &&
-	test "$patched" = `git rev-parse :one` &&
-	test "$patched" = `git hash-object --stdin <one` || {
+	test "$patched" = $(git rev-parse :one) &&
+	test "$patched" = $(git hash-object --stdin <one) || {
 		echo "Eh?  apply with --index"
 		false
 	}
@@ -240,7 +240,7 @@ test_expect_success 'apply patch (autocrlf=true)' '
 	git read-tree --reset -u HEAD &&
 
 	git apply patch.file &&
-	test "$patched" = "`remove_cr <one | git hash-object --stdin`" || {
+	test "$patched" = "$(remove_cr <one | git hash-object --stdin)" || {
 		echo "Eh?  apply without index"
 		false
 	}
@@ -253,7 +253,7 @@ test_expect_success 'apply patch --cached (autocrlf=true)' '
 	git read-tree --reset -u HEAD &&
 
 	git apply --cached patch.file &&
-	test "$patched" = `git rev-parse :one` || {
+	test "$patched" = $(git rev-parse :one) || {
 		echo "Eh?  apply without index"
 		false
 	}
@@ -266,8 +266,8 @@ test_expect_success 'apply patch --index (autocrlf=true)' '
 	git read-tree --reset -u HEAD &&
 
 	git apply --index patch.file &&
-	test "$patched" = `git rev-parse :one` &&
-	test "$patched" = "`remove_cr <one | git hash-object --stdin`" || {
+	test "$patched" = $(git rev-parse :one) &&
+	test "$patched" = "$(remove_cr <one | git hash-object --stdin)" || {
 		echo "Eh?  apply with --index"
 		false
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 012/142] t0025-crlf-auto.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (10 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 011/142] t0020-crlf.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 013/142] t0026-eol-config.sh: " Elia Pinto
                   ` (77 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0025-crlf-auto.sh |   38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/t/t0025-crlf-auto.sh b/t/t0025-crlf-auto.sh
index f5f67a6..b0e5694 100755
--- a/t/t0025-crlf-auto.sh
+++ b/t/t0025-crlf-auto.sh
@@ -19,9 +19,9 @@ test_expect_success setup '
 
 	git commit -m initial &&
 
-	one=`git rev-parse HEAD:one` &&
-	two=`git rev-parse HEAD:two` &&
-	three=`git rev-parse HEAD:three` &&
+	one=$(git rev-parse HEAD:one) &&
+	two=$(git rev-parse HEAD:two) &&
+	three=$(git rev-parse HEAD:three) &&
 
 	echo happy.
 '
@@ -33,9 +33,9 @@ test_expect_success 'default settings cause no changes' '
 
 	! has_cr one &&
 	has_cr two &&
-	onediff=`git diff one` &&
-	twodiff=`git diff two` &&
-	threediff=`git diff three` &&
+	onediff=$(git diff one) &&
+	twodiff=$(git diff two) &&
+	threediff=$(git diff three) &&
 	test -z "$onediff" -a -z "$twodiff" -a -z "$threediff"
 '
 
@@ -48,7 +48,7 @@ test_expect_success 'crlf=true causes a CRLF file to be normalized' '
 
 	# Note, "normalized" means that git will normalize it if added
 	has_cr two &&
-	twodiff=`git diff two` &&
+	twodiff=$(git diff two) &&
 	test -n "$twodiff"
 '
 
@@ -60,7 +60,7 @@ test_expect_success 'text=true causes a CRLF file to be normalized' '
 
 	# Note, "normalized" means that git will normalize it if added
 	has_cr two &&
-	twodiff=`git diff two` &&
+	twodiff=$(git diff two) &&
 	test -n "$twodiff"
 '
 
@@ -72,7 +72,7 @@ test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=false'
 	git read-tree --reset -u HEAD &&
 
 	has_cr one &&
-	onediff=`git diff one` &&
+	onediff=$(git diff one) &&
 	test -z "$onediff"
 '
 
@@ -84,7 +84,7 @@ test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=input'
 	git read-tree --reset -u HEAD &&
 
 	has_cr one &&
-	onediff=`git diff one` &&
+	onediff=$(git diff one) &&
 	test -z "$onediff"
 '
 
@@ -96,7 +96,7 @@ test_expect_success 'eol=lf gives a normalized file LFs with autocrlf=true' '
 	git read-tree --reset -u HEAD &&
 
 	! has_cr one &&
-	onediff=`git diff one` &&
+	onediff=$(git diff one) &&
 	test -z "$onediff"
 '
 
@@ -108,9 +108,9 @@ test_expect_success 'autocrlf=true does not normalize CRLF files' '
 
 	has_cr one &&
 	has_cr two &&
-	onediff=`git diff one` &&
-	twodiff=`git diff two` &&
-	threediff=`git diff three` &&
+	onediff=$(git diff one) &&
+	twodiff=$(git diff two) &&
+	threediff=$(git diff three) &&
 	test -z "$onediff" -a -z "$twodiff" -a -z "$threediff"
 '
 
@@ -123,9 +123,9 @@ test_expect_success 'text=auto, autocrlf=true _does_ normalize CRLF files' '
 
 	has_cr one &&
 	has_cr two &&
-	onediff=`git diff one` &&
-	twodiff=`git diff two` &&
-	threediff=`git diff three` &&
+	onediff=$(git diff one) &&
+	twodiff=$(git diff two) &&
+	threediff=$(git diff three) &&
 	test -z "$onediff" -a -n "$twodiff" -a -z "$threediff"
 '
 
@@ -137,7 +137,7 @@ test_expect_success 'text=auto, autocrlf=true does not normalize binary files' '
 	git read-tree --reset -u HEAD &&
 
 	! has_cr three &&
-	threediff=`git diff three` &&
+	threediff=$(git diff three) &&
 	test -z "$threediff"
 '
 
@@ -148,7 +148,7 @@ test_expect_success 'eol=crlf _does_ normalize binary files' '
 	git read-tree --reset -u HEAD &&
 
 	has_cr three &&
-	threediff=`git diff three` &&
+	threediff=$(git diff three) &&
 	test -z "$threediff"
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 013/142] t0026-eol-config.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (11 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 012/142] t0025-crlf-auto.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 014/142] t0030-stripspace.sh: " Elia Pinto
                   ` (76 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0026-eol-config.sh |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/t/t0026-eol-config.sh b/t/t0026-eol-config.sh
index fe0164b..e1126aa 100755
--- a/t/t0026-eol-config.sh
+++ b/t/t0026-eol-config.sh
@@ -20,8 +20,8 @@ test_expect_success setup '
 
 	git commit -m initial &&
 
-	one=`git rev-parse HEAD:one` &&
-	two=`git rev-parse HEAD:two` &&
+	one=$(git rev-parse HEAD:one) &&
+	two=$(git rev-parse HEAD:two) &&
 
 	echo happy.
 '
@@ -34,8 +34,8 @@ test_expect_success 'eol=lf puts LFs in normalized file' '
 
 	! has_cr one &&
 	! has_cr two &&
-	onediff=`git diff one` &&
-	twodiff=`git diff two` &&
+	onediff=$(git diff one) &&
+	twodiff=$(git diff two) &&
 	test -z "$onediff" -a -z "$twodiff"
 '
 
@@ -47,8 +47,8 @@ test_expect_success 'eol=crlf puts CRLFs in normalized file' '
 
 	has_cr one &&
 	! has_cr two &&
-	onediff=`git diff one` &&
-	twodiff=`git diff two` &&
+	onediff=$(git diff one) &&
+	twodiff=$(git diff two) &&
 	test -z "$onediff" -a -z "$twodiff"
 '
 
@@ -61,8 +61,8 @@ test_expect_success 'autocrlf=true overrides eol=lf' '
 
 	has_cr one &&
 	has_cr two &&
-	onediff=`git diff one` &&
-	twodiff=`git diff two` &&
+	onediff=$(git diff one) &&
+	twodiff=$(git diff two) &&
 	test -z "$onediff" -a -z "$twodiff"
 '
 
@@ -75,8 +75,8 @@ test_expect_success 'autocrlf=true overrides unset eol' '
 
 	has_cr one &&
 	has_cr two &&
-	onediff=`git diff one` &&
-	twodiff=`git diff two` &&
+	onediff=$(git diff one) &&
+	twodiff=$(git diff two) &&
 	test -z "$onediff" -a -z "$twodiff"
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 014/142] t0030-stripspace.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (12 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 013/142] t0026-eol-config.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 015/142] t0300-credentials.sh: " Elia Pinto
                   ` (75 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0030-stripspace.sh |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh
index a8e84d8..0333dd9 100755
--- a/t/t0030-stripspace.sh
+++ b/t/t0030-stripspace.sh
@@ -225,22 +225,22 @@ test_expect_success \
 
 test_expect_success \
     'text without newline at end should end with newline' '
-    test `printf "$ttt" | git stripspace | wc -l` -gt 0 &&
-    test `printf "$ttt$ttt" | git stripspace | wc -l` -gt 0 &&
-    test `printf "$ttt$ttt$ttt" | git stripspace | wc -l` -gt 0 &&
-    test `printf "$ttt$ttt$ttt$ttt" | git stripspace | wc -l` -gt 0
+    test $(printf "$ttt" | git stripspace | wc -l) -gt 0 &&
+    test $(printf "$ttt$ttt" | git stripspace | wc -l) -gt 0 &&
+    test $(printf "$ttt$ttt$ttt" | git stripspace | wc -l) -gt 0 &&
+    test $(printf "$ttt$ttt$ttt$ttt" | git stripspace | wc -l) -gt 0
 '
 
 # text plus spaces at the end:
 
 test_expect_success \
     'text plus spaces without newline at end should end with newline' '
-    test `printf "$ttt$sss" | git stripspace | wc -l` -gt 0 &&
-    test `printf "$ttt$ttt$sss" | git stripspace | wc -l` -gt 0 &&
-    test `printf "$ttt$ttt$ttt$sss" | git stripspace | wc -l` -gt 0 &&
-    test `printf "$ttt$sss$sss" | git stripspace | wc -l` -gt 0 &&
-    test `printf "$ttt$ttt$sss$sss" | git stripspace | wc -l` -gt 0 &&
-    test `printf "$ttt$sss$sss$sss" | git stripspace | wc -l` -gt 0
+    test $(printf "$ttt$sss" | git stripspace | wc -l) -gt 0 &&
+    test $(printf "$ttt$ttt$sss" | git stripspace | wc -l) -gt 0 &&
+    test $(printf "$ttt$ttt$ttt$sss" | git stripspace | wc -l) -gt 0 &&
+    test $(printf "$ttt$sss$sss" | git stripspace | wc -l) -gt 0 &&
+    test $(printf "$ttt$ttt$sss$sss" | git stripspace | wc -l) -gt 0 &&
+    test $(printf "$ttt$sss$sss$sss" | git stripspace | wc -l) -gt 0
 '
 
 test_expect_success \
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 015/142] t0300-credentials.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (13 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 014/142] t0030-stripspace.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 016/142] t1000-read-tree-m-3way.sh: " Elia Pinto
                   ` (74 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0300-credentials.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh
index 538ea5f..57ea5a1 100755
--- a/t/t0300-credentials.sh
+++ b/t/t0300-credentials.sh
@@ -6,7 +6,7 @@ test_description='basic credential helper tests'
 
 test_expect_success 'setup helper scripts' '
 	cat >dump <<-\EOF &&
-	whoami=`echo $0 | sed s/.*git-credential-//`
+	whoami=$(echo $0 | sed s/.*git-credential-//)
 	echo >&2 "$whoami: $*"
 	OIFS=$IFS
 	IFS==
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 016/142] t1000-read-tree-m-3way.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (14 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 015/142] t0300-credentials.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 017/142] t1001-read-tree-m-2way.sh: " Elia Pinto
                   ` (73 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1000-read-tree-m-3way.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t1000-read-tree-m-3way.sh b/t/t1000-read-tree-m-3way.sh
index babcdd2..a0b79b4 100755
--- a/t/t1000-read-tree-m-3way.sh
+++ b/t/t1000-read-tree-m-3way.sh
@@ -519,10 +519,10 @@ test_expect_success \
     'rm -f .git/index F16 &&
     echo F16 >F16 &&
     git update-index --add F16 &&
-    tree0=`git write-tree` &&
+    tree0=$(git write-tree) &&
     echo E16 >F16 &&
     git update-index F16 &&
-    tree1=`git write-tree` &&
+    tree1=$(git write-tree) &&
     read_tree_must_succeed -m $tree0 $tree1 $tree1 $tree0 &&
     git ls-files --stage'
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 017/142] t1001-read-tree-m-2way.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (15 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 016/142] t1000-read-tree-m-3way.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 018/142] t1002-read-tree-m-u-2way.sh: " Elia Pinto
                   ` (72 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1001-read-tree-m-2way.sh |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/t/t1001-read-tree-m-2way.sh b/t/t1001-read-tree-m-2way.sh
index acaab07..f0d8eb9 100755
--- a/t/t1001-read-tree-m-2way.sh
+++ b/t/t1001-read-tree-m-2way.sh
@@ -36,7 +36,7 @@ compare_change () {
 }
 
 check_cache_at () {
-	clean_if_empty=`git diff-files -- "$1"`
+	clean_if_empty=$(git diff-files -- "$1")
 	case "$clean_if_empty" in
 	'')  echo "$1: clean" ;;
 	?*)  echo "$1: dirty" ;;
@@ -68,14 +68,14 @@ test_expect_success \
      echo rezrov >rezrov &&
      echo yomin >yomin &&
      git update-index --add nitfol bozbar rezrov &&
-     treeH=`git write-tree` &&
+     treeH=$(git write-tree) &&
      echo treeH $treeH &&
      git ls-tree $treeH &&
 
      cat bozbar-new >bozbar &&
      git update-index --add frotz bozbar --force-remove rezrov &&
      git ls-files --stage >M.out &&
-     treeM=`git write-tree` &&
+     treeM=$(git write-tree) &&
      echo treeM $treeM &&
      git ls-tree $treeM &&
      git diff-tree $treeH $treeM'
@@ -315,7 +315,7 @@ test_expect_success \
     'rm -f .git/index &&
      echo DF >DF &&
      git update-index --add DF &&
-     treeDF=`git write-tree` &&
+     treeDF=$(git write-tree) &&
      echo treeDF $treeDF &&
      git ls-tree $treeDF &&
 
@@ -323,7 +323,7 @@ test_expect_success \
      mkdir DF &&
      echo DF/DF >DF/DF &&
      git update-index --add --remove DF DF/DF &&
-     treeDFDF=`git write-tree` &&
+     treeDFDF=$(git write-tree) &&
      echo treeDFDF $treeDFDF &&
      git ls-tree $treeDFDF &&
      git ls-files --stage >DFDF.out'
@@ -345,7 +345,7 @@ test_expect_success \
     'rm -f .git/index &&
      : >a &&
      git update-index --add a &&
-     treeM=`git write-tree` &&
+     treeM=$(git write-tree) &&
      echo treeM $treeM &&
      git ls-tree $treeM &&
      git ls-files --stage >treeM.out &&
@@ -354,7 +354,7 @@ test_expect_success \
      git update-index --remove a &&
      mkdir a &&
      : >a/b &&
-     treeH=`git write-tree` &&
+     treeH=$(git write-tree) &&
      echo treeH $treeH &&
      git ls-tree $treeH'
 
@@ -372,7 +372,7 @@ test_expect_success \
      mkdir c &&
      : >c/d &&
      git update-index --add a c/d &&
-     treeM=`git write-tree` &&
+     treeM=$(git write-tree) &&
      echo treeM $treeM &&
      git ls-tree $treeM &&
      git ls-files --stage >treeM.out &&
@@ -381,7 +381,7 @@ test_expect_success \
      mkdir a &&
      : >a/b &&
      git update-index --add --remove a a/b &&
-     treeH=`git write-tree` &&
+     treeH=$(git write-tree) &&
      echo treeH $treeH &&
      git ls-tree $treeH'
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 018/142] t1002-read-tree-m-u-2way.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (16 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 017/142] t1001-read-tree-m-2way.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 019/142] t1003-read-tree-prefix.sh: " Elia Pinto
                   ` (71 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1002-read-tree-m-u-2way.sh |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh
index a847709..fed877b 100755
--- a/t/t1002-read-tree-m-u-2way.sh
+++ b/t/t1002-read-tree-m-u-2way.sh
@@ -21,7 +21,7 @@ compare_change () {
 }
 
 check_cache_at () {
-	clean_if_empty=`git diff-files -- "$1"`
+	clean_if_empty=$(git diff-files -- "$1")
 	case "$clean_if_empty" in
 	'')  echo "$1: clean" ;;
 	?*)  echo "$1: dirty" ;;
@@ -41,14 +41,14 @@ test_expect_success \
      echo bozbar >bozbar &&
      echo rezrov >rezrov &&
      git update-index --add nitfol bozbar rezrov &&
-     treeH=`git write-tree` &&
+     treeH=$(git write-tree) &&
      echo treeH $treeH &&
      git ls-tree $treeH &&
 
      echo gnusto >bozbar &&
      git update-index --add frotz bozbar --force-remove rezrov &&
      git ls-files --stage >M.out &&
-     treeM=`git write-tree` &&
+     treeM=$(git write-tree) &&
      echo treeM $treeM &&
      git ls-tree $treeM &&
      sum bozbar frotz nitfol >M.sum &&
@@ -318,7 +318,7 @@ test_expect_success \
     'rm -f .git/index &&
      echo DF >DF &&
      git update-index --add DF &&
-     treeDF=`git write-tree` &&
+     treeDF=$(git write-tree) &&
      echo treeDF $treeDF &&
      git ls-tree $treeDF &&
 
@@ -326,7 +326,7 @@ test_expect_success \
      mkdir DF &&
      echo DF/DF >DF/DF &&
      git update-index --add --remove DF DF/DF &&
-     treeDFDF=`git write-tree` &&
+     treeDFDF=$(git write-tree) &&
      echo treeDFDF $treeDFDF &&
      git ls-tree $treeDFDF &&
      git ls-files --stage >DFDF.out'
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 019/142] t1003-read-tree-prefix.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (17 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 018/142] t1002-read-tree-m-u-2way.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 020/142] t1004-read-tree-m-u-wf.sh: " Elia Pinto
                   ` (70 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1003-read-tree-prefix.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t1003-read-tree-prefix.sh b/t/t1003-read-tree-prefix.sh
index 8c6d67e..b6111cd 100755
--- a/t/t1003-read-tree-prefix.sh
+++ b/t/t1003-read-tree-prefix.sh
@@ -11,7 +11,7 @@ test_description='git read-tree --prefix test.
 test_expect_success setup '
 	echo hello >one &&
 	git update-index --add one &&
-	tree=`git write-tree` &&
+	tree=$(git write-tree) &&
 	echo tree is $tree
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 020/142] t1004-read-tree-m-u-wf.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (18 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 019/142] t1003-read-tree-prefix.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 021/142] t1020-subdirectory.sh: " Elia Pinto
                   ` (69 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1004-read-tree-m-u-wf.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh
index 3e72aff..c70cf42 100755
--- a/t/t1004-read-tree-m-u-wf.sh
+++ b/t/t1004-read-tree-m-u-wf.sh
@@ -30,7 +30,7 @@ test_expect_success 'two-way not clobbering' '
 
 	echo >file2 master creates untracked file2 &&
 	echo >subdir/file2 master creates untracked subdir/file2 &&
-	if err=`read_tree_u_must_succeed -m -u master side 2>&1`
+	if err=$(read_tree_u_must_succeed -m -u master side 2>&1)
 	then
 		echo should have complained
 		false
@@ -43,7 +43,7 @@ echo file2 >.gitignore
 
 test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '
 
-	if err=`read_tree_u_must_succeed -m --exclude-per-directory=.gitignore master side 2>&1`
+	if err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore master side 2>&1)
 	then
 		echo should have complained
 		false
@@ -54,7 +54,7 @@ test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '
 
 test_expect_success 'two-way with incorrect --exclude-per-directory (2)' '
 
-	if err=`read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore master side 2>&1`
+	if err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore master side 2>&1)
 	then
 		echo should have complained
 		false
@@ -95,7 +95,7 @@ test_expect_success 'three-way not clobbering a working tree file' '
 	git checkout master &&
 	echo >file3 file three created in master, untracked &&
 	echo >subdir/file3 file three created in master, untracked &&
-	if err=`read_tree_u_must_succeed -m -u branch-point master side 2>&1`
+	if err=$(read_tree_u_must_succeed -m -u branch-point master side 2>&1)
 	then
 		echo should have complained
 		false
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 021/142] t1020-subdirectory.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (19 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 020/142] t1004-read-tree-m-u-wf.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 022/142] t1050-large.sh: " Elia Pinto
                   ` (68 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1020-subdirectory.sh |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index 6902320..62c0d25 100755
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
@@ -20,27 +20,27 @@ test_expect_success setup '
 
 test_expect_success 'update-index and ls-files' '
 	git update-index --add one &&
-	case "`git ls-files`" in
+	case "$(git ls-files)" in
 	one) echo pass one ;;
 	*) echo bad one; exit 1 ;;
 	esac &&
 	(
 		cd dir &&
 		git update-index --add two &&
-		case "`git ls-files`" in
+		case "$(git ls-files)" in
 		two) echo pass two ;;
 		*) echo bad two; exit 1 ;;
 		esac
 	) &&
-	case "`git ls-files`" in
+	case "$(git ls-files)" in
 	dir/two"$LF"one) echo pass both ;;
 	*) echo bad; exit 1 ;;
 	esac
 '
 
 test_expect_success 'cat-file' '
-	two=`git ls-files -s dir/two` &&
-	two=`expr "$two" : "[0-7]* \\([0-9a-f]*\\)"` &&
+	two=$(git ls-files -s dir/two) &&
+	two=$(expr "$two" : "[0-7]* \\([0-9a-f]*\\)") &&
 	echo "$two" &&
 	git cat-file -p "$two" >actual &&
 	cmp dir/two actual &&
@@ -55,18 +55,18 @@ rm -f actual dir/actual
 test_expect_success 'diff-files' '
 	echo a >>one &&
 	echo d >>dir/two &&
-	case "`git diff-files --name-only`" in
+	case "$(git diff-files --name-only)" in
 	dir/two"$LF"one) echo pass top ;;
 	*) echo bad top; exit 1 ;;
 	esac &&
 	# diff should not omit leading paths
 	(
 		cd dir &&
-		case "`git diff-files --name-only`" in
+		case "$(git diff-files --name-only)" in
 		dir/two"$LF"one) echo pass subdir ;;
 		*) echo bad subdir; exit 1 ;;
 		esac &&
-		case "`git diff-files --name-only .`" in
+		case "$(git diff-files --name-only .)" in
 		dir/two) echo pass subdir limited ;;
 		*) echo bad subdir limited; exit 1 ;;
 		esac
@@ -74,11 +74,11 @@ test_expect_success 'diff-files' '
 '
 
 test_expect_success 'write-tree' '
-	top=`git write-tree` &&
+	top=$(git write-tree) &&
 	echo $top &&
 	(
 		cd dir &&
-		sub=`git write-tree` &&
+		sub=$(git write-tree) &&
 		echo $sub &&
 		test "z$top" = "z$sub"
 	)
@@ -96,7 +96,7 @@ test_expect_success 'checkout-index' '
 
 test_expect_success 'read-tree' '
 	rm -f one dir/two &&
-	tree=`git write-tree` &&
+	tree=$(git write-tree) &&
 	read_tree_u_must_succeed --reset -u "$tree" &&
 	cmp one original.one &&
 	cmp dir/two original.two &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 022/142] t1050-large.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (20 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 021/142] t1020-subdirectory.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 023/142] t1100-commit-tree-options.sh: " Elia Pinto
                   ` (67 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1050-large.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t1050-large.sh b/t/t1050-large.sh
index fd10528..aea4936 100755
--- a/t/t1050-large.sh
+++ b/t/t1050-large.sh
@@ -131,7 +131,7 @@ test_expect_success 'git-show a large file' '
 '
 
 test_expect_success 'index-pack' '
-	git clone file://"`pwd`"/.git foo &&
+	git clone file://"$(pwd)"/.git foo &&
 	GIT_DIR=non-existent git index-pack --strict --verify foo/.git/objects/pack/*.pack
 '
 
@@ -140,7 +140,7 @@ test_expect_success 'repack' '
 '
 
 test_expect_success 'pack-objects with large loose object' '
-	SHA1=`git hash-object huge` &&
+	SHA1=$(git hash-object huge) &&
 	test_create_repo loose &&
 	echo $SHA1 | git pack-objects --stdout |
 		GIT_ALLOC_LIMIT=0 GIT_DIR=loose/.git git unpack-objects &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 023/142] t1100-commit-tree-options.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (21 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 022/142] t1050-large.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 024/142] t1401-symbolic-ref.sh: " Elia Pinto
                   ` (66 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1100-commit-tree-options.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh
index f8457f9..b7e9b4fc 100755
--- a/t/t1100-commit-tree-options.sh
+++ b/t/t1100-commit-tree-options.sh
@@ -35,11 +35,11 @@ test_expect_success \
      GIT_COMMITTER_NAME="Committer Name" \
      GIT_COMMITTER_EMAIL="committer@email" \
      GIT_COMMITTER_DATE="2005-05-26 23:30" \
-     TZ=GMT git commit-tree `cat treeid` >commitid 2>/dev/null'
+     TZ=GMT git commit-tree $(cat treeid) >commitid 2>/dev/null'
 
 test_expect_success \
     'read commit' \
-    'git cat-file commit `cat commitid` >commit'
+    'git cat-file commit $(cat commitid) >commit'
 
 test_expect_success \
     'compare commit' \
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 024/142] t1401-symbolic-ref.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (22 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 023/142] t1100-commit-tree-options.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 025/142] t1410-reflog.sh: " Elia Pinto
                   ` (65 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1401-symbolic-ref.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t1401-symbolic-ref.sh b/t/t1401-symbolic-ref.sh
index 36378b0..6ea8985 100755
--- a/t/t1401-symbolic-ref.sh
+++ b/t/t1401-symbolic-ref.sh
@@ -29,7 +29,7 @@ reset_to_sane
 
 test_expect_success 'symbolic-ref refuses bare sha1' '
 	echo content >file && git add file && git commit -m one &&
-	test_must_fail git symbolic-ref HEAD `git rev-parse HEAD`
+	test_must_fail git symbolic-ref HEAD $(git rev-parse HEAD)
 '
 reset_to_sane
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 025/142] t1410-reflog.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (23 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 024/142] t1401-symbolic-ref.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 026/142] t1511-rev-parse-caret.sh: " Elia Pinto
                   ` (64 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1410-reflog.sh |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 236b13a..0a9502a 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -62,18 +62,18 @@ test_expect_success setup '
 	git add . &&
 
 	test_tick && git commit -m rabbit &&
-	H=`git rev-parse --verify HEAD` &&
-	A=`git rev-parse --verify HEAD:A` &&
-	B=`git rev-parse --verify HEAD:A/B` &&
-	C=`git rev-parse --verify HEAD:C` &&
-	D=`git rev-parse --verify HEAD:A/D` &&
-	E=`git rev-parse --verify HEAD:A/B/E` &&
+	H=$(git rev-parse --verify HEAD) &&
+	A=$(git rev-parse --verify HEAD:A) &&
+	B=$(git rev-parse --verify HEAD:A/B) &&
+	C=$(git rev-parse --verify HEAD:C) &&
+	D=$(git rev-parse --verify HEAD:A/D) &&
+	E=$(git rev-parse --verify HEAD:A/B/E) &&
 	check_fsck &&
 
 	test_chmod +x C &&
 	git add C &&
 	test_tick && git commit -m dragon &&
-	L=`git rev-parse --verify HEAD` &&
+	L=$(git rev-parse --verify HEAD) &&
 	check_fsck &&
 
 	rm -f C A/B/E &&
@@ -81,15 +81,15 @@ test_expect_success setup '
 	echo horse >A/G &&
 	git add F A/G &&
 	test_tick && git commit -a -m sheep &&
-	F=`git rev-parse --verify HEAD:F` &&
-	G=`git rev-parse --verify HEAD:A/G` &&
-	I=`git rev-parse --verify HEAD:A` &&
-	J=`git rev-parse --verify HEAD` &&
+	F=$(git rev-parse --verify HEAD:F) &&
+	G=$(git rev-parse --verify HEAD:A/G) &&
+	I=$(git rev-parse --verify HEAD:A) &&
+	J=$(git rev-parse --verify HEAD) &&
 	check_fsck &&
 
 	rm -f A/G &&
 	test_tick && git commit -a -m monkey &&
-	K=`git rev-parse --verify HEAD` &&
+	K=$(git rev-parse --verify HEAD) &&
 	check_fsck &&
 
 	check_have A B C D E F G H I J K L &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 026/142] t1511-rev-parse-caret.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (24 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 025/142] t1410-reflog.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 027/142] t1512-rev-parse-disambiguation.sh: " Elia Pinto
                   ` (63 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1511-rev-parse-caret.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t1511-rev-parse-caret.sh b/t/t1511-rev-parse-caret.sh
index 15973f2..7043ba7 100755
--- a/t/t1511-rev-parse-caret.sh
+++ b/t/t1511-rev-parse-caret.sh
@@ -6,11 +6,11 @@ test_description='tests for ref^{stuff}'
 
 test_expect_success 'setup' '
 	echo blob >a-blob &&
-	git tag -a -m blob blob-tag `git hash-object -w a-blob` &&
+	git tag -a -m blob blob-tag $(git hash-object -w a-blob) &&
 	mkdir a-tree &&
 	echo moreblobs >a-tree/another-blob &&
 	git add . &&
-	TREE_SHA1=`git write-tree` &&
+	TREE_SHA1=$(git write-tree) &&
 	git tag -a -m tree tree-tag "$TREE_SHA1" &&
 	git commit -m Initial &&
 	git tag -a -m commit commit-tag &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 027/142] t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (25 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 026/142] t1511-rev-parse-caret.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 028/142] t2102-update-index-symlinks.sh: " Elia Pinto
                   ` (62 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1512-rev-parse-disambiguation.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh
index 4a155c8..e221167 100755
--- a/t/t1512-rev-parse-disambiguation.sh
+++ b/t/t1512-rev-parse-disambiguation.sh
@@ -275,19 +275,19 @@ test_expect_success 'rev-parse --disambiguate' '
 
 test_expect_success 'ambiguous 40-hex ref' '
 	TREE=$(git mktree </dev/null) &&
-	REF=`git rev-parse HEAD` &&
+	REF=$(git rev-parse HEAD) &&
 	VAL=$(git commit-tree $TREE </dev/null) &&
 	git update-ref refs/heads/$REF $VAL &&
-	test `git rev-parse $REF 2>err` = $REF &&
+	test $(git rev-parse $REF 2>err) = $REF &&
 	grep "refname.*${REF}.*ambiguous" err
 '
 
 test_expect_success 'ambiguous short sha1 ref' '
 	TREE=$(git mktree </dev/null) &&
-	REF=`git rev-parse --short HEAD` &&
+	REF=$(git rev-parse --short HEAD) &&
 	VAL=$(git commit-tree $TREE </dev/null) &&
 	git update-ref refs/heads/$REF $VAL &&
-	test `git rev-parse $REF 2>err` = $VAL &&
+	test $(git rev-parse $REF 2>err) = $VAL &&
 	grep "refname.*${REF}.*ambiguous" err
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 028/142] t2102-update-index-symlinks.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (26 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 027/142] t1512-rev-parse-disambiguation.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 029/142] t3030-merge-recursive.sh: " Elia Pinto
                   ` (61 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t2102-update-index-symlinks.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t2102-update-index-symlinks.sh b/t/t2102-update-index-symlinks.sh
index 4d0d0a3..22f2c73 100755
--- a/t/t2102-update-index-symlinks.sh
+++ b/t/t2102-update-index-symlinks.sh
@@ -23,7 +23,7 @@ git update-index symlink'
 
 test_expect_success \
 'the index entry must still be a symbolic link' '
-case "`git ls-files --stage --cached symlink`" in
+case "$(git ls-files --stage --cached symlink)" in
 120000" "*symlink) echo pass;;
 *) echo fail; git ls-files --stage --cached symlink; (exit 1);;
 esac'
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 029/142] t3030-merge-recursive.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (27 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 028/142] t2102-update-index-symlinks.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 030/142] t3100-ls-tree-restrict.sh: " Elia Pinto
                   ` (60 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3030-merge-recursive.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh
index 82e1854..e9757c4 100755
--- a/t/t3030-merge-recursive.sh
+++ b/t/t3030-merge-recursive.sh
@@ -263,7 +263,7 @@ test_expect_success 'setup 8' '
 	test_ln_s_add e a &&
 	test_tick &&
 	git commit -m "rename a->e, symlink a->e" &&
-	oln=`printf e | git hash-object --stdin`
+	oln=$(printf e | git hash-object --stdin)
 '
 
 test_expect_success 'setup 9' '
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 030/142] t3100-ls-tree-restrict.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (28 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 029/142] t3030-merge-recursive.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 031/142] t3101-ls-tree-dirname.sh: " Elia Pinto
                   ` (59 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3100-ls-tree-restrict.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t3100-ls-tree-restrict.sh b/t/t3100-ls-tree-restrict.sh
index eb73c06..325114f 100755
--- a/t/t3100-ls-tree-restrict.sh
+++ b/t/t3100-ls-tree-restrict.sh
@@ -28,7 +28,7 @@ test_expect_success \
      echo Mi >path2/baz/b &&
      find path? \( -type f -o -type l \) -print |
      xargs git update-index --add &&
-     tree=`git write-tree` &&
+     tree=$(git write-tree) &&
      echo $tree'
 
 test_output () {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 031/142] t3101-ls-tree-dirname.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (29 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 030/142] t3100-ls-tree-restrict.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 032/142] t3210-pack-refs.sh: " Elia Pinto
                   ` (58 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3101-ls-tree-dirname.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t3101-ls-tree-dirname.sh b/t/t3101-ls-tree-dirname.sh
index 026f9f8..425d858 100755
--- a/t/t3101-ls-tree-dirname.sh
+++ b/t/t3101-ls-tree-dirname.sh
@@ -35,7 +35,7 @@ test_expect_success 'setup' '
 	echo 222 >path3/2.txt &&
 	find *.txt path* \( -type f -o -type l \) -print |
 	xargs git update-index --add &&
-	tree=`git write-tree` &&
+	tree=$(git write-tree) &&
 	echo $tree
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 032/142] t3210-pack-refs.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (30 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 031/142] t3101-ls-tree-dirname.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 033/142] t3403-rebase-skip.sh: " Elia Pinto
                   ` (57 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3210-pack-refs.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index 1a2080e..b0eaf22 100755
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
@@ -25,7 +25,7 @@ SHA1=
 test_expect_success \
     'see if git show-ref works as expected' \
     'git branch a &&
-     SHA1=`cat .git/refs/heads/a` &&
+     SHA1=$(cat .git/refs/heads/a) &&
      echo "$SHA1 refs/heads/a" >expect &&
      git show-ref a >result &&
      test_cmp expect result'
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 033/142] t3403-rebase-skip.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (31 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 032/142] t3210-pack-refs.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 034/142] t3511-cherry-pick-x.sh: " Elia Pinto
                   ` (56 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3403-rebase-skip.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index 3968020..1f5122b 100755
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
@@ -67,7 +67,7 @@ test_expect_success 'rebase --skip with --merge' '
 '
 
 test_expect_success 'merge and reference trees equal' '
-	test -z "`git diff-tree skip-merge skip-reference`"
+	test -z "$(git diff-tree skip-merge skip-reference)"
 '
 
 test_expect_success 'moved back to branch correctly' '
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 034/142] t3511-cherry-pick-x.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (32 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 033/142] t3403-rebase-skip.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 035/142] t3600-rm.sh: " Elia Pinto
                   ` (55 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3511-cherry-pick-x.sh |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t3511-cherry-pick-x.sh b/t/t3511-cherry-pick-x.sh
index f977279..f60a037 100755
--- a/t/t3511-cherry-pick-x.sh
+++ b/t/t3511-cherry-pick-x.sh
@@ -59,7 +59,7 @@ test_expect_success setup '
 
 test_expect_success 'cherry-pick -x inserts blank line after one line subject' '
 	pristine_detach initial &&
-	sha1=`git rev-parse mesg-one-line^0` &&
+	sha1=$(git rev-parse mesg-one-line^0) &&
 	git cherry-pick -x mesg-one-line &&
 	cat <<-EOF >expect &&
 		$mesg_one_line
@@ -96,7 +96,7 @@ test_expect_success 'cherry-pick -s inserts blank line after non-conforming foot
 
 test_expect_success 'cherry-pick -x inserts blank line when conforming footer not found' '
 	pristine_detach initial &&
-	sha1=`git rev-parse mesg-no-footer^0` &&
+	sha1=$(git rev-parse mesg-no-footer^0) &&
 	git cherry-pick -x mesg-no-footer &&
 	cat <<-EOF >expect &&
 		$mesg_no_footer
@@ -121,7 +121,7 @@ test_expect_success 'cherry-pick -s inserts blank line when conforming footer no
 
 test_expect_success 'cherry-pick -x -s inserts blank line when conforming footer not found' '
 	pristine_detach initial &&
-	sha1=`git rev-parse mesg-no-footer^0` &&
+	sha1=$(git rev-parse mesg-no-footer^0) &&
 	git cherry-pick -x -s mesg-no-footer &&
 	cat <<-EOF >expect &&
 		$mesg_no_footer
@@ -146,7 +146,7 @@ test_expect_success 'cherry-pick -s adds sob when last sob doesnt match committe
 
 test_expect_success 'cherry-pick -x -s adds sob when last sob doesnt match committer' '
 	pristine_detach initial &&
-	sha1=`git rev-parse mesg-with-footer^0` &&
+	sha1=$(git rev-parse mesg-with-footer^0) &&
 	git cherry-pick -x -s mesg-with-footer &&
 	cat <<-EOF >expect &&
 		$mesg_with_footer
@@ -169,7 +169,7 @@ test_expect_success 'cherry-pick -s refrains from adding duplicate trailing sob'
 
 test_expect_success 'cherry-pick -x -s adds sob even when trailing sob exists for committer' '
 	pristine_detach initial &&
-	sha1=`git rev-parse mesg-with-footer-sob^0` &&
+	sha1=$(git rev-parse mesg-with-footer-sob^0) &&
 	git cherry-pick -x -s mesg-with-footer-sob &&
 	cat <<-EOF >expect &&
 		$mesg_with_footer_sob
@@ -182,7 +182,7 @@ test_expect_success 'cherry-pick -x -s adds sob even when trailing sob exists fo
 
 test_expect_success 'cherry-pick -x treats "(cherry picked from..." line as part of footer' '
 	pristine_detach initial &&
-	sha1=`git rev-parse mesg-with-cherry-footer^0` &&
+	sha1=$(git rev-parse mesg-with-cherry-footer^0) &&
 	git cherry-pick -x mesg-with-cherry-footer &&
 	cat <<-EOF >expect &&
 		$mesg_with_cherry_footer
@@ -205,7 +205,7 @@ test_expect_success 'cherry-pick -s treats "(cherry picked from..." line as part
 
 test_expect_success 'cherry-pick -x -s treats "(cherry picked from..." line as part of footer' '
 	pristine_detach initial &&
-	sha1=`git rev-parse mesg-with-cherry-footer^0` &&
+	sha1=$(git rev-parse mesg-with-cherry-footer^0) &&
 	git cherry-pick -x -s mesg-with-cherry-footer &&
 	cat <<-EOF >expect &&
 		$mesg_with_cherry_footer
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 035/142] t3600-rm.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (33 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 034/142] t3511-cherry-pick-x.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 036/142] t3700-add.sh: " Elia Pinto
                   ` (54 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3600-rm.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 3d30581..96f7949 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -115,7 +115,7 @@ test_expect_success '"rm" command printed' '
 	git add test-file &&
 	git commit -m "add file for rm test" &&
 	git rm test-file > rm-output &&
-	test `grep "^rm " rm-output | wc -l` = 1 &&
+	test $(grep "^rm " rm-output | wc -l) = 1 &&
 	rm -f test-file rm-output &&
 	git commit -m "remove file from rm test"
 '
@@ -125,7 +125,7 @@ test_expect_success '"rm" command suppressed with --quiet' '
 	git add test-file &&
 	git commit -m "add file for rm --quiet test" &&
 	git rm --quiet test-file > rm-output &&
-	test `wc -l < rm-output` = 0 &&
+	test $(wc -l < rm-output) = 0 &&
 	rm -f test-file rm-output &&
 	git commit -m "remove file from rm --quiet test"
 '
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 036/142] t3700-add.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (34 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 035/142] t3600-rm.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 037/142] t3905-stash-include-untracked.sh: " Elia Pinto
                   ` (53 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3700-add.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index fe274e2..95eb234 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -25,7 +25,7 @@ test_expect_success \
 	 echo foo >xfoo1 &&
 	 chmod 755 xfoo1 &&
 	 git add xfoo1 &&
-	 case "`git ls-files --stage xfoo1`" in
+	 case "$(git ls-files --stage xfoo1)" in
 	 100644" "*xfoo1) echo pass;;
 	 *) echo fail; git ls-files --stage xfoo1; (exit 1);;
 	 esac'
@@ -33,7 +33,7 @@ test_expect_success \
 test_expect_success 'git add: filemode=0 should not get confused by symlink' '
 	rm -f xfoo1 &&
 	test_ln_s_add foo xfoo1 &&
-	case "`git ls-files --stage xfoo1`" in
+	case "$(git ls-files --stage xfoo1)" in
 	120000" "*xfoo1) echo pass;;
 	*) echo fail; git ls-files --stage xfoo1; (exit 1);;
 	esac
@@ -45,7 +45,7 @@ test_expect_success \
 	 echo foo >xfoo2 &&
 	 chmod 755 xfoo2 &&
 	 git update-index --add xfoo2 &&
-	 case "`git ls-files --stage xfoo2`" in
+	 case "$(git ls-files --stage xfoo2)" in
 	 100644" "*xfoo2) echo pass;;
 	 *) echo fail; git ls-files --stage xfoo2; (exit 1);;
 	 esac'
@@ -53,7 +53,7 @@ test_expect_success \
 test_expect_success 'git add: filemode=0 should not get confused by symlink' '
 	rm -f xfoo2 &&
 	test_ln_s_add foo xfoo2 &&
-	case "`git ls-files --stage xfoo2`" in
+	case "$(git ls-files --stage xfoo2)" in
 	120000" "*xfoo2) echo pass;;
 	*) echo fail; git ls-files --stage xfoo2; (exit 1);;
 	esac
@@ -63,7 +63,7 @@ test_expect_success \
 	'git update-index --add: Test that executable bit is not used...' \
 	'git config core.filemode 0 &&
 	 test_ln_s_add xfoo2 xfoo3 &&	# runs git update-index --add
-	 case "`git ls-files --stage xfoo3`" in
+	 case "$(git ls-files --stage xfoo3)" in
 	 120000" "*xfoo3) echo pass;;
 	 *) echo fail; git ls-files --stage xfoo3; (exit 1);;
 	 esac'
@@ -166,14 +166,14 @@ test_expect_success 'git add with filemode=0, symlinks=0 prefers stage 2 over st
 
 test_expect_success 'git add --refresh' '
 	>foo && git add foo && git commit -a -m "commit all" &&
-	test -z "`git diff-index HEAD -- foo`" &&
+	test -z "$(git diff-index HEAD -- foo)" &&
 	git read-tree HEAD &&
-	case "`git diff-index HEAD -- foo`" in
+	case "$(git diff-index HEAD -- foo)" in
 	:100644" "*"M	foo") echo pass;;
 	*) echo fail; (exit 1);;
 	esac &&
 	git add --refresh -- foo &&
-	test -z "`git diff-index HEAD -- foo`"
+	test -z "$(git diff-index HEAD -- foo)"
 '
 
 test_expect_success 'git add --refresh with pathspec' '
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 037/142] t3905-stash-include-untracked.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (35 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 036/142] t3700-add.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:22 ` [PATCH v2 038/142] t3910-mac-os-precompose.sh: " Elia Pinto
                   ` (52 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3905-stash-include-untracked.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t3905-stash-include-untracked.sh b/t/t3905-stash-include-untracked.sh
index a5e7e6b..f372fc8 100755
--- a/t/t3905-stash-include-untracked.sh
+++ b/t/t3905-stash-include-untracked.sh
@@ -96,8 +96,8 @@ test_expect_success 'stash pop after save --include-untracked leaves files untra
 	git stash pop &&
 	git status --porcelain >actual &&
 	test_cmp expect actual &&
-	test "1" = "`cat file2`" &&
-	test untracked = "`cat untracked/untracked`"
+	test "1" = "$(cat file2)" &&
+	test untracked = "$(cat untracked/untracked)"
 '
 
 git clean --force --quiet -d
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 038/142] t3910-mac-os-precompose.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (36 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 037/142] t3905-stash-include-untracked.sh: " Elia Pinto
@ 2014-03-25 17:22 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 039/142] t4006-diff-mode.sh: " Elia Pinto
                   ` (51 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3910-mac-os-precompose.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh
index e4ba601..96941e9 100755
--- a/t/t3910-mac-os-precompose.sh
+++ b/t/t3910-mac-os-precompose.sh
@@ -14,13 +14,13 @@ then
 fi
 
 # create utf-8 variables
-Adiarnfc=`printf '\303\204'`
-Adiarnfd=`printf 'A\314\210'`
+Adiarnfc=$(printf '\303\204')
+Adiarnfd=$(printf 'A\314\210')
 
-Odiarnfc=`printf '\303\226'`
-Odiarnfd=`printf 'O\314\210'`
-AEligatu=`printf '\303\206'`
-Invalidu=`printf '\303\377'`
+Odiarnfc=$(printf '\303\226')
+Odiarnfd=$(printf 'O\314\210')
+AEligatu=$(printf '\303\206')
+Invalidu=$(printf '\303\377')
 
 
 #Create a string with 255 bytes (decomposed)
@@ -35,7 +35,7 @@ Alongc=$Alongc$Alongc$Alongc$Alongc$Alongc           #250 Byte
 Alongc=$Alongc$AEligatu$AEligatu                     #254 Byte
 
 test_expect_success "detect if nfd needed" '
-	precomposeunicode=`git config core.precomposeunicode` &&
+	precomposeunicode=$(git config core.precomposeunicode) &&
 	test "$precomposeunicode" = true &&
 	git config core.precomposeunicode true
 '
@@ -146,7 +146,7 @@ test_expect_success "respect git config --global core.precomposeunicode" '
 	git config --global core.precomposeunicode true &&
 	rm -rf .git &&
 	git init &&
-	precomposeunicode=`git config core.precomposeunicode` &&
+	precomposeunicode=$(git config core.precomposeunicode) &&
 	test "$precomposeunicode" = "true"
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 039/142] t4006-diff-mode.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (37 preceding siblings ...)
  2014-03-25 17:22 ` [PATCH v2 038/142] t3910-mac-os-precompose.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 040/142] t4010-diff-pathspec.sh: " Elia Pinto
                   ` (50 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4006-diff-mode.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t4006-diff-mode.sh b/t/t4006-diff-mode.sh
index 0591149..76f643b 100755
--- a/t/t4006-diff-mode.sh
+++ b/t/t4006-diff-mode.sh
@@ -13,7 +13,7 @@ sed_script='s/\(:100644 100755\) \('"$_x40"'\) \2 /\1 X X /'
 test_expect_success 'setup' '
 	echo frotz >rezrov &&
 	git update-index --add rezrov &&
-	tree=`git write-tree` &&
+	tree=$(git write-tree) &&
 	echo $tree
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 040/142] t4010-diff-pathspec.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (38 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 039/142] t4006-diff-mode.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 041/142] t4012-diff-binary.sh: " Elia Pinto
                   ` (49 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4010-diff-pathspec.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t4010-diff-pathspec.sh b/t/t4010-diff-pathspec.sh
index 2bb9736..bf07841 100755
--- a/t/t4010-diff-pathspec.sh
+++ b/t/t4010-diff-pathspec.sh
@@ -18,7 +18,7 @@ test_expect_success \
      mkdir path1 &&
      echo rezrov >path1/file1 &&
      git update-index --add file0 path1/file1 &&
-     tree=`git write-tree` &&
+     tree=$(git write-tree) &&
      echo "$tree" &&
      echo nitfol >file0 &&
      echo yomin >path1/file1 &&
@@ -131,7 +131,7 @@ test_expect_success 'diff multiple wildcard pathspecs' '
 	mkdir path2 &&
 	echo rezrov >path2/file1 &&
 	git update-index --add path2/file1 &&
-	tree3=`git write-tree` &&
+	tree3=$(git write-tree) &&
 	git diff --name-only $tree $tree3 -- "path2*1" "path1*1" >actual &&
 	cat <<-\EOF >expect &&
 	path1/file1
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 041/142] t4012-diff-binary.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (39 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 040/142] t4010-diff-pathspec.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 042/142] t4013-diff-various.sh: " Elia Pinto
                   ` (48 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4012-diff-binary.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh
index 1215ae5..643d729 100755
--- a/t/t4012-diff-binary.sh
+++ b/t/t4012-diff-binary.sh
@@ -67,18 +67,18 @@ test_expect_success C_LOCALE_OUTPUT 'apply detecting corrupt patch correctly' '
 	git diff >output &&
 	sed -e "s/-CIT/xCIT/" <output >broken &&
 	test_must_fail git apply --stat --summary broken 2>detected &&
-	detected=`cat detected` &&
-	detected=`expr "$detected" : "fatal.*at line \\([0-9]*\\)\$"` &&
-	detected=`sed -ne "${detected}p" broken` &&
+	detected=$(cat detected) &&
+	detected=$(expr "$detected" : "fatal.*at line \\([0-9]*\\)\$") &&
+	detected=$(sed -ne "${detected}p" broken) &&
 	test "$detected" = xCIT
 '
 
 test_expect_success C_LOCALE_OUTPUT 'apply detecting corrupt patch correctly' '
 	git diff --binary | sed -e "s/-CIT/xCIT/" >broken &&
 	test_must_fail git apply --stat --summary broken 2>detected &&
-	detected=`cat detected` &&
-	detected=`expr "$detected" : "fatal.*at line \\([0-9]*\\)\$"` &&
-	detected=`sed -ne "${detected}p" broken` &&
+	detected=$(cat detected) &&
+	detected=$(expr "$detected" : "fatal.*at line \\([0-9]*\\)\$") &&
+	detected=$(sed -ne "${detected}p" broken) &&
 	test "$detected" = xCIT
 '
 
@@ -88,7 +88,7 @@ test_expect_success 'initial commit' 'git commit -a -m initial'
 test_expect_success 'diff-index with --binary' '
 	echo AIT >a && mv b e && echo CIT >c && cat e >d &&
 	git update-index --add --remove a b c d e &&
-	tree0=`git write-tree` &&
+	tree0=$(git write-tree) &&
 	git diff --cached --binary >current &&
 	git apply --stat --summary current
 '
@@ -96,7 +96,7 @@ test_expect_success 'diff-index with --binary' '
 test_expect_success 'apply binary patch' '
 	git reset --hard &&
 	git apply --binary --index <current &&
-	tree1=`git write-tree` &&
+	tree1=$(git write-tree) &&
 	test "$tree1" = "$tree0"
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 042/142] t4013-diff-various.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (40 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 041/142] t4012-diff-binary.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 043/142] t4014-format-patch.sh: " Elia Pinto
                   ` (47 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4013-diff-various.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index e77c09c..805b055 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -107,14 +107,14 @@ test_expect_success setup '
 +*++ [initial] Initial
 EOF
 
-V=`git version | sed -e 's/^git version //' -e 's/\./\\./g'`
+V=$(git version | sed -e 's/^git version //' -e 's/\./\\./g')
 while read cmd
 do
 	case "$cmd" in
 	'' | '#'*) continue ;;
 	esac
-	test=`echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g'`
-	pfx=`printf "%04d" $test_count`
+	test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g')
+	pfx=$(printf "%04d" $test_count)
 	expect="$TEST_DIRECTORY/t4013/diff.$test"
 	actual="$pfx-diff.$test"
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 043/142] t4014-format-patch.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (41 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 042/142] t4013-diff-various.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 044/142] t4036-format-patch-signer-mime.sh: " Elia Pinto
                   ` (46 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4014-format-patch.sh |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 73194b2..f9ed598 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -43,7 +43,7 @@ test_expect_success setup '
 test_expect_success "format-patch --ignore-if-in-upstream" '
 
 	git format-patch --stdout master..side >patch0 &&
-	cnt=`grep "^From " patch0 | wc -l` &&
+	cnt=$(grep "^From " patch0 | wc -l) &&
 	test $cnt = 3
 
 '
@@ -52,7 +52,7 @@ test_expect_success "format-patch --ignore-if-in-upstream" '
 
 	git format-patch --stdout \
 		--ignore-if-in-upstream master..side >patch1 &&
-	cnt=`grep "^From " patch1 | wc -l` &&
+	cnt=$(grep "^From " patch1 | wc -l) &&
 	test $cnt = 2
 
 '
@@ -69,7 +69,7 @@ test_expect_success "format-patch doesn't consider merge commits" '
 	git checkout -b merger master &&
 	test_tick &&
 	git merge --no-ff slave &&
-	cnt=`git format-patch -3 --stdout | grep "^From " | wc -l` &&
+	cnt=$(git format-patch -3 --stdout | grep "^From " | wc -l) &&
 	test $cnt = 3
 '
 
@@ -77,7 +77,7 @@ test_expect_success "format-patch result applies" '
 
 	git checkout -b rebuild-0 master &&
 	git am -3 patch0 &&
-	cnt=`git rev-list master.. | wc -l` &&
+	cnt=$(git rev-list master.. | wc -l) &&
 	test $cnt = 2
 '
 
@@ -85,7 +85,7 @@ test_expect_success "format-patch --ignore-if-in-upstream result applies" '
 
 	git checkout -b rebuild-1 master &&
 	git am -3 patch1 &&
-	cnt=`git rev-list master.. | wc -l` &&
+	cnt=$(git rev-list master.. | wc -l) &&
 	test $cnt = 2
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 044/142] t4036-format-patch-signer-mime.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (42 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 043/142] t4014-format-patch.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 045/142] t4038-diff-combined.sh: " Elia Pinto
                   ` (45 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4036-format-patch-signer-mime.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t4036-format-patch-signer-mime.sh b/t/t4036-format-patch-signer-mime.sh
index ba43f18..98d9713 100755
--- a/t/t4036-format-patch-signer-mime.sh
+++ b/t/t4036-format-patch-signer-mime.sh
@@ -42,7 +42,7 @@ test_expect_success 'attach and signoff do not duplicate mime headers' '
 
 	GIT_COMMITTER_NAME="はまの ふにおう" \
 	git format-patch -s --stdout -1 --attach >output &&
-	test `grep -ci ^MIME-Version: output` = 1
+	test $(grep -ci ^MIME-Version: output) = 1
 
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 045/142] t4038-diff-combined.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (43 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 044/142] t4036-format-patch-signer-mime.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 046/142] t4057-diff-combined-paths.sh: " Elia Pinto
                   ` (44 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4038-diff-combined.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
index 1019d7b..41913c3 100755
--- a/t/t4038-diff-combined.sh
+++ b/t/t4038-diff-combined.sh
@@ -94,7 +94,7 @@ test_expect_success 'setup for --cc --raw' '
 	blob=$(echo file | git hash-object --stdin -w) &&
 	base_tree=$(echo "100644 blob $blob	file" | git mktree) &&
 	trees= &&
-	for i in `test_seq 1 40`
+	for i in $(test_seq 1 40)
 	do
 		blob=$(echo file$i | git hash-object --stdin -w) &&
 		trees="$trees$(echo "100644 blob $blob	file" | git mktree)$LF"
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 046/142] t4057-diff-combined-paths.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (44 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 045/142] t4038-diff-combined.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 047/142] t4116-apply-reverse.sh: " Elia Pinto
                   ` (43 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4057-diff-combined-paths.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t4057-diff-combined-paths.sh b/t/t4057-diff-combined-paths.sh
index 097e632..dff36b7 100755
--- a/t/t4057-diff-combined-paths.sh
+++ b/t/t4057-diff-combined-paths.sh
@@ -5,7 +5,7 @@ test_description='combined diff show only paths that are different to all parent
 . ./test-lib.sh
 
 # verify that diffc.expect matches output of
-# `git diff -c --name-only HEAD HEAD^ HEAD^2`
+# $(git diff -c --name-only HEAD HEAD^ HEAD^2)
 diffc_verify () {
 	git diff -c --name-only HEAD HEAD^ HEAD^2 >diffc.actual &&
 	test_cmp diffc.expect diffc.actual
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 047/142] t4116-apply-reverse.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (45 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 046/142] t4057-diff-combined-paths.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 048/142] t4119-apply-config.sh: " Elia Pinto
                   ` (42 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4116-apply-reverse.sh |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh
index 1e4d438..ce8567f 100755
--- a/t/t4116-apply-reverse.sh
+++ b/t/t4116-apply-reverse.sh
@@ -30,10 +30,10 @@ test_expect_success setup '
 
 test_expect_success 'apply in forward' '
 
-	T0=`git rev-parse "second^{tree}"` &&
+	T0=$(git rev-parse "second^{tree}") &&
 	git reset --hard initial &&
 	git apply --index --binary patch &&
-	T1=`git write-tree` &&
+	T1=$(git write-tree) &&
 	test "$T0" = "$T1"
 '
 
@@ -62,22 +62,22 @@ test_expect_success 'setup separate repository lacking postimage' '
 
 test_expect_success 'apply in forward without postimage' '
 
-	T0=`git rev-parse "second^{tree}"` &&
+	T0=$(git rev-parse "second^{tree}") &&
 	(
 		cd initial &&
 		git apply --index --binary ../patch &&
-		T1=`git write-tree` &&
+		T1=$(git write-tree) &&
 		test "$T0" = "$T1"
 	)
 '
 
 test_expect_success 'apply in reverse without postimage' '
 
-	T0=`git rev-parse "initial^{tree}"` &&
+	T0=$(git rev-parse "initial^{tree}") &&
 	(
 		cd second &&
 		git apply --index --binary --reverse ../patch &&
-		T1=`git write-tree` &&
+		T1=$(git write-tree) &&
 		test "$T0" = "$T1"
 	)
 '
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 048/142] t4119-apply-config.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (46 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 047/142] t4116-apply-reverse.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 049/142] t4204-patch-id.sh: " Elia Pinto
                   ` (41 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4119-apply-config.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t4119-apply-config.sh b/t/t4119-apply-config.sh
index 3d0384d..c393be6 100755
--- a/t/t4119-apply-config.sh
+++ b/t/t4119-apply-config.sh
@@ -68,7 +68,7 @@ test_expect_success 'apply --whitespace=strip from config' '
 	check_result sub/file1
 '
 
-D=`pwd`
+D=$(pwd)
 
 test_expect_success 'apply --whitespace=strip in subdir' '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 049/142] t4204-patch-id.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (47 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 048/142] t4119-apply-config.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 050/142] t5000-tar-tree.sh: " Elia Pinto
                   ` (40 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4204-patch-id.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t4204-patch-id.sh b/t/t4204-patch-id.sh
index d2c930d..7940f6f 100755
--- a/t/t4204-patch-id.sh
+++ b/t/t4204-patch-id.sh
@@ -45,8 +45,8 @@ test_expect_success 'patch-id supports git-format-patch output' '
 	git checkout same &&
 	git format-patch -1 --stdout | calc_patch_id same &&
 	test_cmp patch-id_master patch-id_same &&
-	set `git format-patch -1 --stdout | git patch-id` &&
-	test "$2" = `git rev-parse HEAD`
+	set $(git format-patch -1 --stdout | git patch-id) &&
+	test "$2" = $(git rev-parse HEAD)
 '
 
 test_expect_success 'whitespace is irrelevant in footer' '
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 050/142] t5000-tar-tree.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (48 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 049/142] t4204-patch-id.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 051/142] t5003-archive-zip.sh: " Elia Pinto
                   ` (39 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5000-tar-tree.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 1cf0a4e..74fc5a8 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -123,7 +123,7 @@ test_expect_success \
     'add files to repository' \
     'find a -type f | xargs git update-index --add &&
      find a -type l | xargs git update-index --add &&
-     treeid=`git write-tree` &&
+     treeid=$(git write-tree) &&
      echo $treeid >treeid &&
      git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
      git commit-tree $treeid </dev/null)'
@@ -207,7 +207,7 @@ test_expect_success \
 
 test_expect_success 'clients cannot access unreachable commits' '
 	test_commit unreachable &&
-	sha1=`git rev-parse HEAD` &&
+	sha1=$(git rev-parse HEAD) &&
 	git reset --hard HEAD^ &&
 	git archive $sha1 >remote.tar &&
 	test_must_fail git archive --remote=. $sha1 >remote.tar
@@ -215,7 +215,7 @@ test_expect_success 'clients cannot access unreachable commits' '
 
 test_expect_success 'upload-archive can allow unreachable commits' '
 	test_commit unreachable1 &&
-	sha1=`git rev-parse HEAD` &&
+	sha1=$(git rev-parse HEAD) &&
 	git reset --hard HEAD^ &&
 	git archive $sha1 >remote.tar &&
 	test_config uploadarchive.allowUnreachable true &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 051/142] t5003-archive-zip.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (49 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 050/142] t5000-tar-tree.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 052/142] t5100-mailinfo.sh: " Elia Pinto
                   ` (38 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5003-archive-zip.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh
index c72f71e..8f04a56 100755
--- a/t/t5003-archive-zip.sh
+++ b/t/t5003-archive-zip.sh
@@ -65,7 +65,7 @@ test_expect_success \
     'add files to repository' \
     'find a -type f | xargs git update-index --add &&
      find a -type l | xargs git update-index --add &&
-     treeid=`git write-tree` &&
+     treeid=$(git write-tree) &&
      echo $treeid >treeid &&
      git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
      git commit-tree $treeid </dev/null)'
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 052/142] t5100-mailinfo.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (50 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 051/142] t5003-archive-zip.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 053/142] t5300-pack-object.sh: " Elia Pinto
                   ` (37 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5100-mailinfo.sh |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh
index 3e64a7a..c279410 100755
--- a/t/t5100-mailinfo.sh
+++ b/t/t5100-mailinfo.sh
@@ -9,9 +9,9 @@ test_description='git mailinfo and git mailsplit test'
 
 test_expect_success 'split sample box' \
 	'git mailsplit -o. "$TEST_DIRECTORY"/t5100/sample.mbox >last &&
-	last=`cat last` &&
+	last=$(cat last) &&
 	echo total is $last &&
-	test `cat last` = 17'
+	test $(cat last) = 17'
 
 check_mailinfo () {
 	mail=$1 opt=$2
@@ -23,7 +23,7 @@ check_mailinfo () {
 }
 
 
-for mail in `echo 00*`
+for mail in $(echo 00*)
 do
 	test_expect_success "mailinfo $mail" '
 		check_mailinfo $mail "" &&
@@ -43,11 +43,11 @@ test_expect_success 'split box with rfc2047 samples' \
 	'mkdir rfc2047 &&
 	git mailsplit -orfc2047 "$TEST_DIRECTORY"/t5100/rfc2047-samples.mbox \
 	  >rfc2047/last &&
-	last=`cat rfc2047/last` &&
+	last=$(cat rfc2047/last) &&
 	echo total is $last &&
-	test `cat rfc2047/last` = 11'
+	test $(cat rfc2047/last) = 11'
 
-for mail in `echo rfc2047/00*`
+for mail in $(echo rfc2047/00*)
 do
 	test_expect_success "mailinfo $mail" '
 		git mailinfo -u $mail-msg $mail-patch <$mail >$mail-info &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 053/142] t5300-pack-object.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (51 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 052/142] t5100-mailinfo.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 054/142] t5301-sliding-window.sh: " Elia Pinto
                   ` (36 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5300-pack-object.sh |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index 20c1961..fc2be63 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -8,7 +8,7 @@ test_description='git pack-object
 '
 . ./test-lib.sh
 
-TRASH=`pwd`
+TRASH=$(pwd)
 
 test_expect_success \
     'setup' \
@@ -20,8 +20,8 @@ test_expect_success \
      test-genrandom "seed b" 2097152 > b_big &&
      git update-index --add a a_big b b_big c &&
      cat c >d && echo foo >>d && git update-index --add d &&
-     tree=`git write-tree` &&
-     commit=`git commit-tree $tree </dev/null` && {
+     tree=$(git write-tree) &&
+     commit=$(git commit-tree $tree </dev/null) && {
 	 echo $tree &&
 	 echo $commit &&
 	 git ls-tree $tree | sed -e "s/.* \\([0-9a-f]*\\)	.*/\\1/"
@@ -29,7 +29,7 @@ test_expect_success \
 	 git diff-tree --root -p $commit &&
 	 while read object
 	 do
-	    t=`git cat-file -t $object` &&
+	    t=$(git cat-file -t $object) &&
 	    git cat-file $t $object || return 1
 	 done <obj-list
      } >expect'
@@ -147,7 +147,7 @@ test_expect_success \
 	 git diff-tree --root -p $commit &&
 	 while read object
 	 do
-	    t=`git cat-file -t $object` &&
+	    t=$(git cat-file -t $object) &&
 	    git cat-file $t $object || return 1
 	 done <obj-list
     } >current &&
@@ -162,7 +162,7 @@ test_expect_success \
 	 git diff-tree --root -p $commit &&
 	 while read object
 	 do
-	    t=`git cat-file -t $object` &&
+	    t=$(git cat-file -t $object) &&
 	    git cat-file $t $object || return 1
 	 done <obj-list
     } >current &&
@@ -177,7 +177,7 @@ test_expect_success \
 	 git diff-tree --root -p $commit &&
 	 while read object
 	 do
-	    t=`git cat-file -t $object` &&
+	    t=$(git cat-file -t $object) &&
 	    git cat-file $t $object || return 1
 	 done <obj-list
     } >current &&
@@ -252,8 +252,8 @@ test_expect_success \
 
 test_expect_success \
     'verify-pack catches a corrupted sum of the index file itself' \
-    'l=`wc -c <test-3.idx` &&
-     l=`expr $l - 20` &&
+    'l=$(wc -c <test-3.idx) &&
+     l=$(expr $l - 20) &&
      cat test-1-${packname_1}.pack >test-3.pack &&
      printf "%20s" "" | dd of=test-3.idx count=20 bs=1 conv=notrunc seek=$l &&
      if git verify-pack test-3.pack
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 054/142] t5301-sliding-window.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (52 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 053/142] t5300-pack-object.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 055/142] t5302-pack-index.sh: " Elia Pinto
                   ` (35 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5301-sliding-window.sh |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t5301-sliding-window.sh b/t/t5301-sliding-window.sh
index 2fc5af6..cae8c2e 100755
--- a/t/t5301-sliding-window.sh
+++ b/t/t5301-sliding-window.sh
@@ -16,12 +16,12 @@ test_expect_success \
          git update-index --add $i || return 1
      done &&
      echo d >d && cat c >>d && git update-index --add d &&
-     tree=`git write-tree` &&
-     commit1=`git commit-tree $tree </dev/null` &&
+     tree=$(git write-tree) &&
+     commit1=$(git commit-tree $tree </dev/null) &&
      git update-ref HEAD $commit1 &&
      git repack -a -d &&
-     test "`git count-objects`" = "0 objects, 0 kilobytes" &&
-     pack1=`ls .git/objects/pack/*.pack` &&
+     test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
+     pack1=$(ls .git/objects/pack/*.pack) &&
      test -f "$pack1"'
 
 test_expect_success \
@@ -43,11 +43,11 @@ test_expect_success \
     'repack -a -d, packedGit{WindowSize,Limit} == 1 page' \
     'git config core.packedGitWindowSize 512 &&
      git config core.packedGitLimit 512 &&
-     commit2=`git commit-tree $tree -p $commit1 </dev/null` &&
+     commit2=$(git commit-tree $tree -p $commit1 </dev/null) &&
      git update-ref HEAD $commit2 &&
      git repack -a -d &&
-     test "`git count-objects`" = "0 objects, 0 kilobytes" &&
-     pack2=`ls .git/objects/pack/*.pack` &&
+     test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
+     pack2=$(ls .git/objects/pack/*.pack) &&
      test -f "$pack2" &&
      test "$pack1" \!= "$pack2"'
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 055/142] t5302-pack-index.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (53 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 054/142] t5301-sliding-window.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 056/142] t5303-pack-corruption-resilience.sh: " Elia Pinto
                   ` (34 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5302-pack-index.sh |   34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
index 4bbb718..442ee5c 100755
--- a/t/t5302-pack-index.sh
+++ b/t/t5302-pack-index.sh
@@ -14,21 +14,21 @@ test_expect_success \
      i=1 &&
      while test $i -le 100
      do
-         iii=`printf '%03i' $i`
+         iii=$(printf '%03i' $i)
          test-genrandom "bar" 200 > wide_delta_$iii &&
          test-genrandom "baz $iii" 50 >> wide_delta_$iii &&
          test-genrandom "foo"$i 100 > deep_delta_$iii &&
-         test-genrandom "foo"`expr $i + 1` 100 >> deep_delta_$iii &&
-         test-genrandom "foo"`expr $i + 2` 100 >> deep_delta_$iii &&
+         test-genrandom "foo"$(expr $i + 1) 100 >> deep_delta_$iii &&
+         test-genrandom "foo"$(expr $i + 2) 100 >> deep_delta_$iii &&
          echo $iii >file_$iii &&
          test-genrandom "$iii" 8192 >>file_$iii &&
          git update-index --add file_$iii deep_delta_$iii wide_delta_$iii &&
-         i=`expr $i + 1` || return 1
+         i=$(expr $i + 1) || return 1
      done &&
      { echo 101 && test-genrandom 100 8192; } >file_101 &&
      git update-index --add file_101 &&
-     tree=`git write-tree` &&
-     commit=`git commit-tree $tree </dev/null` && {
+     tree=$(git write-tree) &&
+     commit=$(git commit-tree $tree </dev/null) && {
 	 echo $tree &&
 	 git ls-tree $tree | sed -e "s/.* \\([0-9a-f]*\\)	.*/\\1/"
      } >obj-list &&
@@ -152,10 +152,10 @@ test_expect_success \
     '[index v1] 2) create a stealth corruption in a delta base reference' \
     '# This test assumes file_101 is a delta smaller than 16 bytes.
      # It should be against file_100 but we substitute its base for file_099
-     sha1_101=`git hash-object file_101` &&
-     sha1_099=`git hash-object file_099` &&
-     offs_101=`index_obj_offset 1.idx $sha1_101` &&
-     nr_099=`index_obj_nr 1.idx $sha1_099` &&
+     sha1_101=$(git hash-object file_101) &&
+     sha1_099=$(git hash-object file_099) &&
+     offs_101=$(index_obj_offset 1.idx $sha1_101) &&
+     nr_099=$(index_obj_nr 1.idx $sha1_099) &&
      chmod +w ".git/objects/pack/pack-${pack1}.pack" &&
      dd of=".git/objects/pack/pack-${pack1}.pack" seek=$(($offs_101 + 1)) \
         if=".git/objects/pack/pack-${pack1}.idx" \
@@ -193,10 +193,10 @@ test_expect_success \
     '[index v2] 2) create a stealth corruption in a delta base reference' \
     '# This test assumes file_101 is a delta smaller than 16 bytes.
      # It should be against file_100 but we substitute its base for file_099
-     sha1_101=`git hash-object file_101` &&
-     sha1_099=`git hash-object file_099` &&
-     offs_101=`index_obj_offset 1.idx $sha1_101` &&
-     nr_099=`index_obj_nr 1.idx $sha1_099` &&
+     sha1_101=$(git hash-object file_101) &&
+     sha1_099=$(git hash-object file_099) &&
+     offs_101=$(index_obj_offset 1.idx $sha1_101) &&
+     nr_099=$(index_obj_nr 1.idx $sha1_099) &&
      chmod +w ".git/objects/pack/pack-${pack1}.pack" &&
      dd of=".git/objects/pack/pack-${pack1}.pack" seek=$(($offs_101 + 1)) \
         if=".git/objects/pack/pack-${pack1}.idx" \
@@ -222,11 +222,11 @@ test_expect_success \
     'rm -f .git/objects/pack/* &&
      git index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
      git verify-pack ".git/objects/pack/pack-${pack1}.pack" &&
-     obj=`git hash-object file_001` &&
-     nr=`index_obj_nr ".git/objects/pack/pack-${pack1}.idx" $obj` &&
+     obj=$(git hash-object file_001) &&
+     nr=$(index_obj_nr ".git/objects/pack/pack-${pack1}.idx" $obj) &&
      chmod +w ".git/objects/pack/pack-${pack1}.idx" &&
      printf xxxx | dd of=".git/objects/pack/pack-${pack1}.idx" conv=notrunc \
-        bs=1 count=4 seek=$((8 + 256 * 4 + `wc -l <obj-list` * 20 + $nr * 4)) &&
+        bs=1 count=4 seek=$((8 + 256 * 4 + $(wc -l <obj-list) * 20 + $nr * 4)) &&
      ( while read obj
        do git cat-file -p $obj >/dev/null || exit 1
        done <obj-list ) &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 056/142] t5303-pack-corruption-resilience.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (54 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 055/142] t5302-pack-index.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 057/142] t5304-prune.sh: " Elia Pinto
                   ` (33 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5303-pack-corruption-resilience.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t5303-pack-corruption-resilience.sh b/t/t5303-pack-corruption-resilience.sh
index 663b02b..98bed18 100755
--- a/t/t5303-pack-corruption-resilience.sh
+++ b/t/t5303-pack-corruption-resilience.sh
@@ -32,9 +32,9 @@ create_test_files() {
 create_new_pack() {
     rm -rf .git &&
     git init &&
-    blob_1=`git hash-object -t blob -w file_1` &&
-    blob_2=`git hash-object -t blob -w file_2` &&
-    blob_3=`git hash-object -t blob -w file_3` &&
+    blob_1=$(git hash-object -t blob -w file_1) &&
+    blob_2=$(git hash-object -t blob -w file_2) &&
+    blob_3=$(git hash-object -t blob -w file_3) &&
     pack=`printf "$blob_1\n$blob_2\n$blob_3\n" |
           git pack-objects $@ .git/objects/pack/pack` &&
     pack=".git/objects/pack/pack-${pack}" &&
@@ -48,7 +48,7 @@ do_repack() {
 }
 
 do_corrupt_object() {
-    ofs=`git show-index < ${pack}.idx | grep $1 | cut -f1 -d" "` &&
+    ofs=$(git show-index < ${pack}.idx | grep $1 | cut -f1 -d" ") &&
     ofs=$(($ofs + $2)) &&
     chmod +w ${pack}.pack &&
     dd of=${pack}.pack bs=1 conv=notrunc seek=$ofs &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 057/142] t5304-prune.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (55 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 056/142] t5303-pack-corruption-resilience.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 058/142] t5305-include-tag.sh: " Elia Pinto
                   ` (32 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5304-prune.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
index 66c9a41..84501a5 100755
--- a/t/t5304-prune.sh
+++ b/t/t5304-prune.sh
@@ -222,7 +222,7 @@ EOF
 '
 
 test_expect_success 'prune .git/shallow' '
-	SHA1=`echo hi|git commit-tree HEAD^{tree}` &&
+	SHA1=$(echo hi|git commit-tree HEAD^{tree}) &&
 	echo $SHA1 >.git/shallow &&
 	git prune --dry-run >out &&
 	grep $SHA1 .git/shallow &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 058/142] t5305-include-tag.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (56 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 057/142] t5304-prune.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 059/142] t5500-fetch-pack.sh: " Elia Pinto
                   ` (31 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5305-include-tag.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t5305-include-tag.sh b/t/t5305-include-tag.sh
index b061864..74b4a03 100755
--- a/t/t5305-include-tag.sh
+++ b/t/t5305-include-tag.sh
@@ -3,20 +3,20 @@
 test_description='git pack-object --include-tag'
 . ./test-lib.sh
 
-TRASH=`pwd`
+TRASH=$(pwd)
 
 test_expect_success setup '
 	echo c >d &&
 	git update-index --add d &&
-	tree=`git write-tree` &&
-	commit=`git commit-tree $tree </dev/null` &&
+	tree=$(git write-tree) &&
+	commit=$(git commit-tree $tree </dev/null) &&
 	echo "object $commit" >sig &&
 	echo "type commit" >>sig &&
 	echo "tag mytag" >>sig &&
 	echo "tagger $(git var GIT_COMMITTER_IDENT)" >>sig &&
 	echo >>sig &&
 	echo "our test tag" >>sig &&
-	tag=`git mktag <sig` &&
+	tag=$(git mktag <sig) &&
 	rm d sig &&
 	git update-ref refs/tags/mytag $tag && {
 		echo $tree &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 059/142] t5500-fetch-pack.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (57 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 058/142] t5305-include-tag.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 060/142] t5505-remote.sh: " Elia Pinto
                   ` (30 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5500-fetch-pack.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 5b2b1c2..99b81e2 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -14,7 +14,7 @@ test_description='Testing multi_ack pack fetching'
 add () {
 	name=$1 &&
 	text="$@" &&
-	branch=`echo $name | sed -e 's/^\(.\).*$/\1/'` &&
+	branch=$(echo $name | sed -e 's/^\(.\).*$/\1/') &&
 	parents="" &&
 
 	shift &&
@@ -56,12 +56,12 @@ pull_to_client () {
 			git fsck --full &&
 
 			mv .git/objects/pack/pack-* . &&
-			p=`ls -1 pack-*.pack` &&
+			p=$(ls -1 pack-*.pack) &&
 			git unpack-objects <$p &&
 			git fsck --full &&
 
-			idx=`echo pack-*.idx` &&
-			pack_count=`git show-index <$idx | wc -l` &&
+			idx=$(echo pack-*.idx) &&
+			pack_count=$(git show-index <$idx | wc -l) &&
 			test $pack_count = $count &&
 			rm -f pack-*
 		)
@@ -132,13 +132,13 @@ test_expect_success 'single given branch clone' '
 
 test_expect_success 'clone shallow depth 1' '
 	git clone --no-single-branch --depth 1 "file://$(pwd)/." shallow0 &&
-	test "`git --git-dir=shallow0/.git rev-list --count HEAD`" = 1
+	test "$(git --git-dir=shallow0/.git rev-list --count HEAD)" = 1
 '
 
 test_expect_success 'clone shallow depth 1 with fsck' '
 	git config --global fetch.fsckobjects true &&
 	git clone --no-single-branch --depth 1 "file://$(pwd)/." shallow0fsck &&
-	test "`git --git-dir=shallow0fsck/.git rev-list --count HEAD`" = 1 &&
+	test "$(git --git-dir=shallow0fsck/.git rev-list --count HEAD)" = 1 &&
 	git config --global --unset fetch.fsckobjects
 '
 
@@ -147,7 +147,7 @@ test_expect_success 'clone shallow' '
 '
 
 test_expect_success 'clone shallow depth count' '
-	test "`git --git-dir=shallow/.git rev-list --count HEAD`" = 2
+	test "$(git --git-dir=shallow/.git rev-list --count HEAD)" = 2
 '
 
 test_expect_success 'clone shallow object count' '
@@ -273,7 +273,7 @@ test_expect_success 'additional simple shallow deepenings' '
 '
 
 test_expect_success 'clone shallow depth count' '
-	test "`git --git-dir=shallow/.git rev-list --count HEAD`" = 11
+	test "$(git --git-dir=shallow/.git rev-list --count HEAD)" = 11
 '
 
 test_expect_success 'clone shallow object count' '
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 060/142] t5505-remote.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (58 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 059/142] t5500-fetch-pack.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 061/142] t5506-remote-groups.sh: " Elia Pinto
                   ` (29 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5505-remote.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index ac79dd9..366a583 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -85,7 +85,7 @@ test_expect_success C_LOCALE_OUTPUT 'check remote-tracking' '
 test_expect_success 'remote forces tracking branches' '
 	(
 		cd test &&
-		case `git config remote.second.fetch` in
+		case $(git config remote.second.fetch) in
 		+*) true ;;
 		 *) false ;;
 		esac
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 061/142] t5506-remote-groups.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (59 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 060/142] t5505-remote.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 062/142] t5510-fetch.sh: " Elia Pinto
                   ` (28 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5506-remote-groups.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5506-remote-groups.sh b/t/t5506-remote-groups.sh
index 530b016..83d5558 100755
--- a/t/t5506-remote-groups.sh
+++ b/t/t5506-remote-groups.sh
@@ -20,7 +20,7 @@ update_repos() {
 }
 
 repo_fetched() {
-	if test "`git log -1 --pretty=format:%s $1 --`" = "`cat mark`"; then
+	if test "$(git log -1 --pretty=format:%s $1 --)" = "$(cat mark)"; then
 		echo >&2 "repo was fetched: $1"
 		return 0
 	fi
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 062/142] t5510-fetch.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (60 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 061/142] t5506-remote-groups.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 063/142] t5515-fetch-merge-logic.sh: " Elia Pinto
                   ` (27 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5510-fetch.sh |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index ab28594..31b185e 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -7,7 +7,7 @@ test_description='Per branch config variables affects "git fetch".
 
 . ./test-lib.sh
 
-D=`pwd`
+D=$(pwd)
 
 test_bundle_object_count () {
 	git verify-pack -v "$1" >verify.out &&
@@ -64,8 +64,8 @@ test_expect_success "fetch test" '
 	cd two &&
 	git fetch &&
 	test -f .git/refs/heads/one &&
-	mine=`git rev-parse refs/heads/one` &&
-	his=`cd ../one && git rev-parse refs/heads/master` &&
+	mine=$(git rev-parse refs/heads/one) &&
+	his=$(cd ../one && git rev-parse refs/heads/master) &&
 	test "z$mine" = "z$his"
 '
 
@@ -75,8 +75,8 @@ test_expect_success "fetch test for-merge" '
 	git fetch &&
 	test -f .git/refs/heads/two &&
 	test -f .git/refs/heads/one &&
-	master_in_two=`cd ../two && git rev-parse master` &&
-	one_in_two=`cd ../two && git rev-parse one` &&
+	master_in_two=$(cd ../two && git rev-parse master) &&
+	one_in_two=$(cd ../two && git rev-parse one) &&
 	{
 		echo "$one_in_two	"
 		echo "$master_in_two	not-for-merge"
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 063/142] t5515-fetch-merge-logic.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (61 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 062/142] t5510-fetch.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 064/142] t5516-fetch-push.sh: " Elia Pinto
                   ` (26 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5515-fetch-merge-logic.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh
index dbb927d..36b0dbc 100755
--- a/t/t5515-fetch-merge-logic.sh
+++ b/t/t5515-fetch-merge-logic.sh
@@ -128,8 +128,8 @@ do
 	case "$cmd" in
 	'' | '#'*) continue ;;
 	esac
-	test=`echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g'`
-	pfx=`printf "%04d" $test_count`
+	test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g')
+	pfx=$(printf "%04d" $test_count)
 	expect_f="$TEST_DIRECTORY/t5515/fetch.$test"
 	actual_f="$pfx-fetch.$test"
 	expect_r="$TEST_DIRECTORY/t5515/refs.$test"
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 064/142] t5516-fetch-push.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (62 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 063/142] t5515-fetch-merge-logic.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 065/142] t5517-push-mirror.sh: " Elia Pinto
                   ` (25 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5516-fetch-push.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 67e0ab3..a9ed84e 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -15,7 +15,7 @@ This test checks the following functionality:
 
 . ./test-lib.sh
 
-D=`pwd`
+D=$(pwd)
 
 mk_empty () {
 	repo_name="$1"
@@ -421,7 +421,7 @@ test_expect_success 'push tag with non-existent, incomplete dest' '
 test_expect_success 'push sha1 with non-existent, incomplete dest' '
 
 	mk_test testrepo &&
-	test_must_fail git push testrepo `git rev-parse master`:foo
+	test_must_fail git push testrepo $(git rev-parse master):foo
 
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 065/142] t5517-push-mirror.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (63 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 064/142] t5516-fetch-push.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 066/142] t5520-pull.sh: " Elia Pinto
                   ` (24 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5517-push-mirror.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5517-push-mirror.sh b/t/t5517-push-mirror.sh
index 12a5dfb..02f160a 100755
--- a/t/t5517-push-mirror.sh
+++ b/t/t5517-push-mirror.sh
@@ -4,7 +4,7 @@ test_description='pushing to a mirror repository'
 
 . ./test-lib.sh
 
-D=`pwd`
+D=$(pwd)
 
 invert () {
 	if "$@"; then
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 066/142] t5520-pull.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (64 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 065/142] t5517-push-mirror.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 067/142] t5522-pull-symlink.sh: " Elia Pinto
                   ` (23 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5520-pull.sh |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 227d293..a68c099 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -9,7 +9,7 @@ modify () {
 	mv "$2.x" "$2"
 }
 
-D=`pwd`
+D=$(pwd)
 
 test_expect_success setup '
 
@@ -94,9 +94,9 @@ test_expect_success 'test . as a remote' '
 	echo updated >file &&
 	git commit -a -m updated &&
 	git checkout copy &&
-	test `cat file` = file &&
+	test $(cat file) = file &&
 	git pull &&
-	test `cat file` = updated
+	test $(cat file) = updated
 '
 
 test_expect_success 'the default remote . should not break explicit pull' '
@@ -105,9 +105,9 @@ test_expect_success 'the default remote . should not break explicit pull' '
 	git commit -a -m modified &&
 	git checkout copy &&
 	git reset --hard HEAD^ &&
-	test `cat file` = file &&
+	test $(cat file) = file &&
 	git pull . second &&
-	test `cat file` = modified
+	test $(cat file) = modified
 '
 
 test_expect_success '--rebase' '
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 067/142] t5522-pull-symlink.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (65 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 066/142] t5520-pull.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 068/142] t5530-upload-pack-error.sh: " Elia Pinto
                   ` (22 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5522-pull-symlink.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5522-pull-symlink.sh b/t/t5522-pull-symlink.sh
index 8e9b204..bcff460 100755
--- a/t/t5522-pull-symlink.sh
+++ b/t/t5522-pull-symlink.sh
@@ -54,7 +54,7 @@ test_expect_success SYMLINKS 'pulling from real subdir' '
 # git rev-parse --show-cdup printed a path relative to
 # clone-repo/subdir/, not subdir-link/.  Git rev-parse --show-cdup
 # used the correct .git, but when the git pull shell script did
-# "cd `git rev-parse --show-cdup`", it ended up in the wrong
+# "cd $(git rev-parse --show-cdup)", it ended up in the wrong
 # directory.  A POSIX shell's "cd" works a little differently
 # than chdir() in C; "cd -P" is much closer to chdir().
 #
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 068/142] t5530-upload-pack-error.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (66 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 067/142] t5522-pull-symlink.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 069/142] t5537-fetch-shallow.sh: " Elia Pinto
                   ` (21 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5530-upload-pack-error.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh
index 3932e79..4f6e32b 100755
--- a/t/t5530-upload-pack-error.sh
+++ b/t/t5530-upload-pack-error.sh
@@ -4,7 +4,7 @@ test_description='errors in upload-pack'
 
 . ./test-lib.sh
 
-D=`pwd`
+D=$(pwd)
 
 corrupt_repo () {
 	object_sha1=$(git rev-parse "$1") &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 069/142] t5537-fetch-shallow.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (67 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 068/142] t5530-upload-pack-error.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 070/142] t5538-push-shallow.sh: " Elia Pinto
                   ` (20 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5537-fetch-shallow.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh
index be951a4..d9ea98a 100755
--- a/t/t5537-fetch-shallow.sh
+++ b/t/t5537-fetch-shallow.sh
@@ -98,7 +98,7 @@ EOF
 test_expect_success 'fetch something upstream has but hidden by clients shallow boundaries' '
 	# the blob "1" is available in .git but hidden by the
 	# shallow2/.git/shallow and it should be resent
-	! git --git-dir=shallow2/.git cat-file blob `echo 1|git hash-object --stdin` >/dev/null &&
+	! git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) >/dev/null &&
 	echo 1 >1.t &&
 	git add 1.t &&
 	git commit -m add-1-back &&
@@ -114,7 +114,7 @@ add-1-back
 EOF
 	test_cmp expect actual
 	) &&
-	git --git-dir=shallow2/.git cat-file blob `echo 1|git hash-object --stdin` >/dev/null
+	git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) >/dev/null
 
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 070/142] t5538-push-shallow.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (68 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 069/142] t5537-fetch-shallow.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 071/142] t5550-http-fetch-dumb.sh: " Elia Pinto
                   ` (19 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5538-push-shallow.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t5538-push-shallow.sh b/t/t5538-push-shallow.sh
index 8e54ac5..23a729a 100755
--- a/t/t5538-push-shallow.sh
+++ b/t/t5538-push-shallow.sh
@@ -104,7 +104,7 @@ EOF
 '
 
 test_expect_success 'push from full to shallow' '
-	! git --git-dir=shallow2/.git cat-file blob `echo 1|git hash-object --stdin` &&
+	! git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) &&
 	commit 1 &&
 	git push shallow2/.git +master:refs/remotes/top/master &&
 	(
@@ -117,7 +117,7 @@ test_expect_success 'push from full to shallow' '
 3
 EOF
 	test_cmp expect actual &&
-	git cat-file blob `echo 1|git hash-object --stdin` >/dev/null
+	git cat-file blob $(echo 1|git hash-object --stdin) >/dev/null
 	)
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 071/142] t5550-http-fetch-dumb.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (69 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 070/142] t5538-push-shallow.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 072/142] t5551-http-fetch-smart.sh: " Elia Pinto
                   ` (18 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5550-http-fetch-dumb.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh
index 1a3a2b6..5ccb271 100755
--- a/t/t5550-http-fetch-dumb.sh
+++ b/t/t5550-http-fetch-dumb.sh
@@ -138,7 +138,7 @@ test_expect_success 'fetch packed objects' '
 test_expect_success 'fetch notices corrupt pack' '
 	cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git "$HTTPD_DOCUMENT_ROOT_PATH"/repo_bad1.git &&
 	(cd "$HTTPD_DOCUMENT_ROOT_PATH"/repo_bad1.git &&
-	 p=`ls objects/pack/pack-*.pack` &&
+	 p=$(ls objects/pack/pack-*.pack) &&
 	 chmod u+w $p &&
 	 printf %0256d 0 | dd of=$p bs=256 count=1 seek=1 conv=notrunc
 	) &&
@@ -146,14 +146,14 @@ test_expect_success 'fetch notices corrupt pack' '
 	(cd repo_bad1.git &&
 	 git --bare init &&
 	 test_must_fail git --bare fetch $HTTPD_URL/dumb/repo_bad1.git &&
-	 test 0 = `ls objects/pack/pack-*.pack | wc -l`
+	 test 0 = $(ls objects/pack/pack-*.pack | wc -l)
 	)
 '
 
 test_expect_success 'fetch notices corrupt idx' '
 	cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git "$HTTPD_DOCUMENT_ROOT_PATH"/repo_bad2.git &&
 	(cd "$HTTPD_DOCUMENT_ROOT_PATH"/repo_bad2.git &&
-	 p=`ls objects/pack/pack-*.idx` &&
+	 p=$(ls objects/pack/pack-*.idx) &&
 	 chmod u+w $p &&
 	 printf %0256d 0 | dd of=$p bs=256 count=1 seek=1 conv=notrunc
 	) &&
@@ -161,7 +161,7 @@ test_expect_success 'fetch notices corrupt idx' '
 	(cd repo_bad2.git &&
 	 git --bare init &&
 	 test_must_fail git --bare fetch $HTTPD_URL/dumb/repo_bad2.git &&
-	 test 0 = `ls objects/pack | wc -l`
+	 test 0 = $(ls objects/pack | wc -l)
 	)
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 072/142] t5551-http-fetch-smart.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (70 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 071/142] t5550-http-fetch-dumb.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 073/142] t5570-git-daemon.sh: " Elia Pinto
                   ` (17 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5551-http-fetch-smart.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh
index e07eaf3..232c5ac 100755
--- a/t/t5551-http-fetch-smart.sh
+++ b/t/t5551-http-fetch-smart.sh
@@ -218,7 +218,7 @@ test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE
 test_expect_success EXPENSIVE 'create 50,000 tags in the repo' '
 	(
 	cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
-	for i in `test_seq 50000`
+	for i in $(test_seq 50000)
 	do
 		echo "commit refs/heads/too-many-refs"
 		echo "mark :$i"
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 073/142] t5570-git-daemon.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (71 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 072/142] t5551-http-fetch-smart.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 074/142] t5601-clone.sh: " Elia Pinto
                   ` (16 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5570-git-daemon.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t5570-git-daemon.sh b/t/t5570-git-daemon.sh
index 6b16379..eb07dbe 100755
--- a/t/t5570-git-daemon.sh
+++ b/t/t5570-git-daemon.sh
@@ -57,7 +57,7 @@ test_expect_success 'prepare pack objects' '
 test_expect_success 'fetch notices corrupt pack' '
 	cp -R "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_pack.git "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_bad1.git &&
 	(cd "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_bad1.git &&
-	 p=`ls objects/pack/pack-*.pack` &&
+	 p=$(ls objects/pack/pack-*.pack) &&
 	 chmod u+w $p &&
 	 printf %0256d 0 | dd of=$p bs=256 count=1 seek=1 conv=notrunc
 	) &&
@@ -65,14 +65,14 @@ test_expect_success 'fetch notices corrupt pack' '
 	(cd repo_bad1.git &&
 	 git --bare init &&
 	 test_must_fail git --bare fetch "$GIT_DAEMON_URL/repo_bad1.git" &&
-	 test 0 = `ls objects/pack/pack-*.pack | wc -l`
+	 test 0 = $(ls objects/pack/pack-*.pack | wc -l)
 	)
 '
 
 test_expect_success 'fetch notices corrupt idx' '
 	cp -R "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_pack.git "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_bad2.git &&
 	(cd "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_bad2.git &&
-	 p=`ls objects/pack/pack-*.idx` &&
+	 p=$(ls objects/pack/pack-*.idx) &&
 	 chmod u+w $p &&
 	 printf %0256d 0 | dd of=$p bs=256 count=1 seek=1 conv=notrunc
 	) &&
@@ -80,7 +80,7 @@ test_expect_success 'fetch notices corrupt idx' '
 	(cd repo_bad2.git &&
 	 git --bare init &&
 	 test_must_fail git --bare fetch "$GIT_DAEMON_URL/repo_bad2.git" &&
-	 test 0 = `ls objects/pack | wc -l`
+	 test 0 = $(ls objects/pack | wc -l)
 	)
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 074/142] t5601-clone.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (72 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 073/142] t5570-git-daemon.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 075/142] t5700-clone-reference.sh: " Elia Pinto
                   ` (15 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5601-clone.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 5e67035..fbe83a1 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -221,7 +221,7 @@ test_expect_success 'clone separate gitdir' '
 '
 
 test_expect_success 'clone separate gitdir: output' '
-	echo "gitdir: `pwd`/realgitdir" >expected &&
+	echo "gitdir: $(pwd)/realgitdir" >expected &&
 	test_cmp expected dst/.git
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 075/142] t5700-clone-reference.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (73 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 074/142] t5601-clone.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 076/142] t5710-info-alternate.sh: " Elia Pinto
                   ` (14 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5700-clone-reference.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh
index 6537911..571aee4 100755
--- a/t/t5700-clone-reference.sh
+++ b/t/t5700-clone-reference.sh
@@ -6,7 +6,7 @@
 test_description='test clone --reference'
 . ./test-lib.sh
 
-base_dir=`pwd`
+base_dir=$(pwd)
 
 U=$base_dir/UPLOAD_LOG
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 076/142] t5710-info-alternate.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (74 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 075/142] t5700-clone-reference.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 077/142] t5900-repo-selection.sh: " Elia Pinto
                   ` (13 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5710-info-alternate.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5710-info-alternate.sh b/t/t5710-info-alternate.sh
index 5a6e49d..9cd2626 100755
--- a/t/t5710-info-alternate.sh
+++ b/t/t5710-info-alternate.sh
@@ -21,7 +21,7 @@ test_valid_repo() {
 	test_line_count = 0 fsck.log
 }
 
-base_dir=`pwd`
+base_dir=$(pwd)
 
 test_expect_success 'preparing first repository' \
 'test_create_repo A && cd A &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 077/142] t5900-repo-selection.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (75 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 076/142] t5710-info-alternate.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 078/142] t6001-rev-list-graft.sh: " Elia Pinto
                   ` (12 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5900-repo-selection.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5900-repo-selection.sh b/t/t5900-repo-selection.sh
index 3d5b418..14e59c5 100755
--- a/t/t5900-repo-selection.sh
+++ b/t/t5900-repo-selection.sh
@@ -15,7 +15,7 @@ make_tree() {
 make_bare() {
 	git init --bare "$1" &&
 	(cd "$1" &&
-	 tree=`git hash-object -w -t tree /dev/null` &&
+	 tree=$(git hash-object -w -t tree /dev/null) &&
 	 commit=$(echo "$1" | git commit-tree $tree) &&
 	 git update-ref HEAD $commit
 	)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 078/142] t6001-rev-list-graft.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (76 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 077/142] t5900-repo-selection.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 079/142] t6002-rev-list-bisect.sh: " Elia Pinto
                   ` (11 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6001-rev-list-graft.sh |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/t6001-rev-list-graft.sh b/t/t6001-rev-list-graft.sh
index 8efcd13..05ddc69 100755
--- a/t/t6001-rev-list-graft.sh
+++ b/t/t6001-rev-list-graft.sh
@@ -10,15 +10,15 @@ test_expect_success setup '
 	echo >subdir/fileB fileB &&
 	git add fileA subdir/fileB &&
 	git commit -a -m "Initial in one history." &&
-	A0=`git rev-parse --verify HEAD` &&
+	A0=$(git rev-parse --verify HEAD) &&
 
 	echo >fileA fileA modified &&
 	git commit -a -m "Second in one history." &&
-	A1=`git rev-parse --verify HEAD` &&
+	A1=$(git rev-parse --verify HEAD) &&
 
 	echo >subdir/fileB fileB modified &&
 	git commit -a -m "Third in one history." &&
-	A2=`git rev-parse --verify HEAD` &&
+	A2=$(git rev-parse --verify HEAD) &&
 
 	rm -f .git/refs/heads/master .git/index &&
 
@@ -26,15 +26,15 @@ test_expect_success setup '
 	echo >subdir/fileB fileB again &&
 	git add fileA subdir/fileB &&
 	git commit -a -m "Initial in alternate history." &&
-	B0=`git rev-parse --verify HEAD` &&
+	B0=$(git rev-parse --verify HEAD) &&
 
 	echo >fileA fileA modified in alternate history &&
 	git commit -a -m "Second in alternate history." &&
-	B1=`git rev-parse --verify HEAD` &&
+	B1=$(git rev-parse --verify HEAD) &&
 
 	echo >subdir/fileB fileB modified in alternate history &&
 	git commit -a -m "Third in alternate history." &&
-	B2=`git rev-parse --verify HEAD` &&
+	B2=$(git rev-parse --verify HEAD) &&
 	: done
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 079/142] t6002-rev-list-bisect.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (77 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 078/142] t6001-rev-list-graft.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 080/142] t6015-rev-list-show-all-parents.sh: " Elia Pinto
                   ` (10 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6002-rev-list-bisect.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t6002-rev-list-bisect.sh b/t/t6002-rev-list-bisect.sh
index 43ad772..3bf2759 100755
--- a/t/t6002-rev-list-bisect.sh
+++ b/t/t6002-rev-list-bisect.sh
@@ -27,9 +27,9 @@ test_bisection_diff()
 	# Test if bisection size is close to half of list size within
 	# tolerance.
 	#
-	_bisect_err=`expr $_list_size - $_bisection_size \* 2`
-	test "$_bisect_err" -lt 0 && _bisect_err=`expr 0 - $_bisect_err`
-	_bisect_err=`expr $_bisect_err / 2` ; # floor
+	_bisect_err=$(expr $_list_size - $_bisection_size \* 2)
+	test "$_bisect_err" -lt 0 && _bisect_err=$(expr 0 - $_bisect_err)
+	_bisect_err=$(expr $_bisect_err / 2) ; # floor
 
 	test_expect_success \
 	"bisection diff $_bisect_option $_head $* <= $_max_diff" \
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 080/142] t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (78 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 079/142] t6002-rev-list-bisect.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 081/142] t6032-merge-large-rename.sh: " Elia Pinto
                   ` (9 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6015-rev-list-show-all-parents.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t6015-rev-list-show-all-parents.sh b/t/t6015-rev-list-show-all-parents.sh
index 8b146fb..3c73c93 100755
--- a/t/t6015-rev-list-show-all-parents.sh
+++ b/t/t6015-rev-list-show-all-parents.sh
@@ -6,11 +6,11 @@ test_description='--show-all --parents does not rewrite TREESAME commits'
 
 test_expect_success 'set up --show-all --parents test' '
 	test_commit one foo.txt &&
-	commit1=`git rev-list -1 HEAD` &&
+	commit1=$(git rev-list -1 HEAD) &&
 	test_commit two bar.txt &&
-	commit2=`git rev-list -1 HEAD` &&
+	commit2=$(git rev-list -1 HEAD) &&
 	test_commit three foo.txt &&
-	commit3=`git rev-list -1 HEAD`
+	commit3=$(git rev-list -1 HEAD)
 	'
 
 test_expect_success '--parents rewrites TREESAME parents correctly' '
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 081/142] t6032-merge-large-rename.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (79 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 080/142] t6015-rev-list-show-all-parents.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 082/142] t6034-merge-rename-nocruft.sh: " Elia Pinto
                   ` (8 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6032-merge-large-rename.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t6032-merge-large-rename.sh b/t/t6032-merge-large-rename.sh
index 15beecc..36019df 100755
--- a/t/t6032-merge-large-rename.sh
+++ b/t/t6032-merge-large-rename.sh
@@ -20,7 +20,7 @@ test_expect_success 'setup (initial)' '
 
 make_text() {
 	echo $1: $2
-	for i in `count 20`; do
+	for i in $(count 20); do
 		echo $1: $i
 	done
 	echo $1: $3
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 082/142] t6034-merge-rename-nocruft.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (80 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 081/142] t6032-merge-large-rename.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 083/142] t6132-pathspec-exclude.sh: " Elia Pinto
                   ` (7 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6034-merge-rename-nocruft.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t6034-merge-rename-nocruft.sh b/t/t6034-merge-rename-nocruft.sh
index 65be95f..34f17be 100755
--- a/t/t6034-merge-rename-nocruft.sh
+++ b/t/t6034-merge-rename-nocruft.sh
@@ -117,7 +117,7 @@ test_expect_success 'merge blue into white (A->B, mod A, A untracked)' \
 		echo "BAD: A does not exist in working directory"
 		return 1
 	}
-	test `cat A` = dirty || {
+	test $(cat A) = dirty || {
 		echo "BAD: A content is wrong"
 		return 1
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 083/142] t6132-pathspec-exclude.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (81 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 082/142] t6034-merge-rename-nocruft.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 084/142] t7001-mv.sh: " Elia Pinto
                   ` (6 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6132-pathspec-exclude.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t6132-pathspec-exclude.sh b/t/t6132-pathspec-exclude.sh
index 62049be..801afae 100755
--- a/t/t6132-pathspec-exclude.sh
+++ b/t/t6132-pathspec-exclude.sh
@@ -7,7 +7,7 @@ test_description='test case exclude pathspec'
 test_expect_success 'setup' '
 	for p in file sub/file sub/sub/file sub/file2 sub/sub/sub/file sub2/file; do
 		if echo $p | grep /; then
-			mkdir -p `dirname $p`
+			mkdir -p $(dirname $p)
 		fi &&
 		: >$p &&
 		git add $p &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 084/142] t7001-mv.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (82 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 083/142] t6132-pathspec-exclude.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 085/142] t7003-filter-branch.sh: " Elia Pinto
                   ` (5 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7001-mv.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index e3c8c2c..23564bf 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -156,11 +156,11 @@ test_expect_success "Michael Cassar's test case" '
 	echo b > partA/outline.txt &&
 	echo c > papers/unsorted/_another &&
 	git add papers partA &&
-	T1=`git write-tree` &&
+	T1=$(git write-tree) &&
 
 	git mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf &&
 
-	T=`git write-tree` &&
+	T=$(git write-tree) &&
 	git ls-tree -r $T | grep partA/outline.txt || {
 		git ls-tree -r $T
 		(exit 1)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 085/142] t7003-filter-branch.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (83 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 084/142] t7001-mv.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 086/142] t7004-tag.sh: " Elia Pinto
                   ` (4 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7003-filter-branch.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index 9496736..87459a5 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -362,7 +362,7 @@ test_expect_success 'setup submodule' '
 	git branch original HEAD
 '
 
-orig_head=`git show-ref --hash --head HEAD`
+orig_head=$(git show-ref --hash --head HEAD)
 
 test_expect_success 'rewrite submodule with another content' '
 	git filter-branch --tree-filter "test -d submod && {
@@ -371,7 +371,7 @@ test_expect_success 'rewrite submodule with another content' '
 					 mkdir submod &&
 					 : > submod/file
 					 } || :" HEAD &&
-	test $orig_head != `git show-ref --hash --head HEAD`
+	test $orig_head != $(git show-ref --hash --head HEAD)
 '
 
 test_expect_success 'replace submodule revision' '
@@ -380,7 +380,7 @@ test_expect_success 'replace submodule revision' '
 	    "if git ls-files --error-unmatch -- submod > /dev/null 2>&1
 	     then git update-index --cacheinfo 160000 0123456789012345678901234567890123456789 submod
 	     fi" HEAD &&
-	test $orig_head != `git show-ref --hash --head HEAD`
+	test $orig_head != $(git show-ref --hash --head HEAD)
 '
 
 test_done
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 086/142] t7004-tag.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (84 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 085/142] t7003-filter-branch.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 087/142] t7006-pager.sh: " Elia Pinto
                   ` (3 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7004-tag.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 143a8ea..2ed8fc0 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -23,8 +23,8 @@ test_expect_success 'listing all tags in an empty tree should succeed' '
 '
 
 test_expect_success 'listing all tags in an empty tree should output nothing' '
-	test `git tag -l | wc -l` -eq 0 &&
-	test `git tag | wc -l` -eq 0
+	test $(git tag -l | wc -l) -eq 0 &&
+	test $(git tag | wc -l) -eq 0
 '
 
 test_expect_success 'looking for a tag in an empty tree should fail' \
@@ -60,8 +60,8 @@ test_expect_success 'listing all tags if one exists should succeed' '
 '
 
 test_expect_success 'listing all tags if one exists should output that tag' '
-	test `git tag -l` = mytag &&
-	test `git tag` = mytag
+	test $(git tag -l) = mytag &&
+	test $(git tag) = mytag
 '
 
 # pattern matching:
@@ -71,7 +71,7 @@ test_expect_success 'listing a tag using a matching pattern should succeed' \
 
 test_expect_success \
 	'listing a tag using a matching pattern should output that tag' \
-	'test `git tag -l mytag` = mytag'
+	'test $(git tag -l mytag) = mytag'
 
 # todo: git tag -l now returns always zero, when fixed, change this test
 test_expect_success \
@@ -80,7 +80,7 @@ test_expect_success \
 
 test_expect_success \
 	'listing tags using a non-matching pattern should output nothing' \
-	'test `git tag -l xxx | wc -l` -eq 0'
+	'test $(git tag -l xxx | wc -l) -eq 0'
 
 # special cases for creating tags:
 
@@ -90,13 +90,13 @@ test_expect_success \
 
 test_expect_success \
 	'trying to create a tag with a non-valid name should fail' '
-	test `git tag -l | wc -l` -eq 1 &&
+	test $(git tag -l | wc -l) -eq 1 &&
 	test_must_fail git tag "" &&
 	test_must_fail git tag .othertag &&
 	test_must_fail git tag "other tag" &&
 	test_must_fail git tag "othertag^" &&
 	test_must_fail git tag "other~tag" &&
-	test `git tag -l | wc -l` -eq 1
+	test $(git tag -l | wc -l) -eq 1
 '
 
 test_expect_success 'creating a tag using HEAD directly should succeed' '
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 087/142] t7006-pager.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (85 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 086/142] t7004-tag.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 088/142] t7103-reset-bare.sh: " Elia Pinto
                   ` (2 subsequent siblings)
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7006-pager.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index b9365b4..7576fa9 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -436,7 +436,7 @@ test_expect_success TTY 'command-specific pager works for external commands' '
 	echo "foo:initial" >expect &&
 	>actual &&
 	test_config pager.external "sed s/^/foo:/ >actual" &&
-	test_terminal git --exec-path="`pwd`" external log --format=%s -1 &&
+	test_terminal git --exec-path="$(pwd)" external log --format=%s -1 &&
 	test_cmp expect actual
 '
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 088/142] t7103-reset-bare.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (86 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 087/142] t7006-pager.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 17:23 ` [PATCH v2 089/142] t7406-submodule-update.sh: " Elia Pinto
  2014-03-25 18:41 ` [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Junio C Hamano
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7103-reset-bare.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t7103-reset-bare.sh b/t/t7103-reset-bare.sh
index 1eef93c..afe36a5 100755
--- a/t/t7103-reset-bare.sh
+++ b/t/t7103-reset-bare.sh
@@ -63,7 +63,7 @@ test_expect_success '"mixed" reset is not allowed in bare' '
 
 test_expect_success '"soft" reset is allowed in bare' '
 	git reset --soft HEAD^ &&
-	test "`git show --pretty=format:%s | head -n 1`" = "one"
+	test "$(git show --pretty=format:%s | head -n 1)" = "one"
 '
 
 test_done
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* [PATCH v2 089/142] t7406-submodule-update.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (87 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 088/142] t7103-reset-bare.sh: " Elia Pinto
@ 2014-03-25 17:23 ` Elia Pinto
  2014-03-25 18:41 ` [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Junio C Hamano
  89 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

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

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7406-submodule-update.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 28ca763..294a4a6 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -14,8 +14,8 @@ submodule and "git submodule update --rebase/--merge" does not detach the HEAD.
 
 compare_head()
 {
-    sha_master=`git rev-list --max-count=1 master`
-    sha_head=`git rev-list --max-count=1 HEAD`
+    sha_master=$(git rev-list --max-count=1 master)
+    sha_head=$(git rev-list --max-count=1 HEAD)
 
     test "$sha_master" = "$sha_head"
 }
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 101+ messages in thread

* Re: [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes
  2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
                   ` (88 preceding siblings ...)
  2014-03-25 17:23 ` [PATCH v2 089/142] t7406-submodule-update.sh: " Elia Pinto
@ 2014-03-25 18:41 ` Junio C Hamano
  2014-03-26  7:02   ` Matthieu Moy
  89 siblings, 1 reply; 101+ messages in thread
From: Junio C Hamano @ 2014-03-25 18:41 UTC (permalink / raw)
  To: Elia Pinto; +Cc: git

Elia Pinto <gitter.spiros@gmail.com> writes:

> This is a second reroll after the 
> Matthieu Moy review. Changes from v1:
>
> - Dropped the silly patches to t6111-rev-list-treesame.sh, 
>   t0204-gettext-reencode-sanity.sh.
>
> - Simple reformatting of the commit message.
>
> - added the toy script used for doing the patch.

In other words, Mattheiu pointed out two examples of breakages and
they were the only mistakes after you re-reviewed the mechanical
changes, and there is no more?

 - Cleaning up is a good thing, but

 - Mechanical and mindless conversion is always error-prone, and

 - Eyeballing each and every change is required, but

 - Nobody has time or energy to go through 140+ patches in one go,
   with enough concentration necessary to do so without making
   mistakes (this applies to yourself, too---producing mechanical
   replacement is a no-cost thing, finding mistakes in mechanical
   replacement takes real effort).

That is why we strongly discourage people from such a whole-tree
clean-up just for the sake of clean-up and nothing else, and instead
encourage them to clean-up as a preparatory step for real work on
the files involved.  Sure, it would not give us as wide a coverage
as a mechanical whole-tree replacement in one-go, but that is the
only practical way to avoid mistakes.

If it were "four patches per every Monday" kind of trickle, we might
be able to spend some review bandwidth while reviewing other
patches, though.

So.... I am not very enthused about reviewing and applying these
patches in their current form.

Thanks.

^ permalink raw reply	[flat|nested] 101+ messages in thread

* Re: [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 ` [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution Elia Pinto
@ 2014-03-25 19:57   ` Junio C Hamano
  2014-03-25 20:32     ` David Kastrup
  2014-03-25 20:36     ` Junio C Hamano
  2014-03-26  6:57   ` Matthieu Moy
  1 sibling, 2 replies; 101+ messages in thread
From: Junio C Hamano @ 2014-03-25 19:57 UTC (permalink / raw)
  To: Elia Pinto; +Cc: git

Elia Pinto <gitter.spiros@gmail.com> writes:

> The Git CodingGuidelines prefer the $( ... ) construct for command
> substitution instead of using the back-quotes, or grave accents (`..`).
>
> The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
> the Korn shell.
>
> The patch was generated by the simple script
>
> for _f in $(find . -name "*.sh")
> do
>   sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
> done

"and then carefully proofread" is sorely needed here.

What is that non-breaking space doing at the beginning of an
indented line, or is it just my environment, by the way?

> Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
> ---
>  check-builtins.sh |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/check-builtins.sh b/check-builtins.sh
> index d6fe6cf..07cff69 100755
> --- a/check-builtins.sh
> +++ b/check-builtins.sh
> @@ -14,8 +14,8 @@ sort |
>      bad=0
>      while read builtin
>      do
> -	base=`expr "$builtin" : 'git-\(.*\)'`
> -	x=`sed -ne 's/.*{ "'$base'", \(cmd_[^, ]*\).*/'$base'	\1/p' git.c`
> +	base=$(expr "$builtin" : 'git-\(.*\)')
> +	x=$(sed -ne 's/.*{ "'$base'", \(cmd_[^, ]*\).*/'$base'	\1/p' git.c)
>  	if test -z "$x"
>  	then
>  		echo "$base is builtin but not listed in git.c command list"

Looks ok to me.

^ permalink raw reply	[flat|nested] 101+ messages in thread

* Re: [PATCH v2 009/142] t0001-init.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 ` [PATCH v2 009/142] t0001-init.sh: " Elia Pinto
@ 2014-03-25 20:02   ` Junio C Hamano
  0 siblings, 0 replies; 101+ messages in thread
From: Junio C Hamano @ 2014-03-25 20:02 UTC (permalink / raw)
  To: Elia Pinto; +Cc: git

This conflicts with a topic in flight.

^ permalink raw reply	[flat|nested] 101+ messages in thread

* Re: [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution
  2014-03-25 19:57   ` Junio C Hamano
@ 2014-03-25 20:32     ` David Kastrup
  2014-03-26 12:19       ` Matthieu Moy
  2014-03-25 20:36     ` Junio C Hamano
  1 sibling, 1 reply; 101+ messages in thread
From: David Kastrup @ 2014-03-25 20:32 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Elia Pinto, git

Junio C Hamano <gitster@pobox.com> writes:

> Elia Pinto <gitter.spiros@gmail.com> writes:
>
>> The Git CodingGuidelines prefer the $( ... ) construct for command
>> substitution instead of using the back-quotes, or grave accents (`..`).
>>
>> The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
>> the Korn shell.
>>
>> The patch was generated by the simple script
>>
>> for _f in $(find . -name "*.sh")
>> do
>>   sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
>> done
>
> "and then carefully proofread" is sorely needed here.

It would already help to skip comment lines.

-- 
David Kastrup

^ permalink raw reply	[flat|nested] 101+ messages in thread

* Re: [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution
  2014-03-25 19:57   ` Junio C Hamano
  2014-03-25 20:32     ` David Kastrup
@ 2014-03-25 20:36     ` Junio C Hamano
  2014-03-25 20:38       ` Junio C Hamano
  1 sibling, 1 reply; 101+ messages in thread
From: Junio C Hamano @ 2014-03-25 20:36 UTC (permalink / raw)
  To: Elia Pinto; +Cc: git

Junio C Hamano <gitster@pobox.com> writes:

> Elia Pinto <gitter.spiros@gmail.com> writes:
>
>> The Git CodingGuidelines prefer the $( ... ) construct for command
>> substitution instead of using the back-quotes, or grave accents (`..`).
>>
>> The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
>> the Korn shell.
>>
>> The patch was generated by the simple script
>>
>> for _f in $(find . -name "*.sh")
>> do
>>   sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
>> done
>
> "and then carefully proofread" is sorely needed here.
>
> What is that non-breaking space doing at the beginning of an
> indented line, or is it just my environment, by the way?

I've reworded the above like so:

    check-builtins.sh: use the $(...) construct for command substitution
    
    The Git CodingGuidelines prefer the $(...) construct for command
    substitution instead of using the backquotes, or grave accents
    (`...`).
    
    The backquoted form is the historical 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>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>


I looked at [*1*] to pick between "back-quote" and "backquote"; this
is a related tangent, but in that page, you will find this gem:

    Within the backquoted style of command substitution, <backslash>
    shall retain its literal meaning, except when followed by: '$',
    '`', or <backslash>.

Stated another way, `` => $() conversion will make backslash inside
to bahave differently, and we would need to be careful when doing
such a change.

I've looked at and queued 001 and 002.


[Reference]

*1* http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03

^ permalink raw reply	[flat|nested] 101+ messages in thread

* Re: [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution
  2014-03-25 20:36     ` Junio C Hamano
@ 2014-03-25 20:38       ` Junio C Hamano
  0 siblings, 0 replies; 101+ messages in thread
From: Junio C Hamano @ 2014-03-25 20:38 UTC (permalink / raw)
  To: Elia Pinto; +Cc: git

Junio C Hamano <gitster@pobox.com> writes:

> I've reworded the above like so:
>
>     check-builtins.sh: use the $(...) construct for command substitution
>     
>     The Git CodingGuidelines prefer the $(...) construct for command
>     substitution instead of using the backquotes, or grave accents
>     (`...`).

... but I think the ", or grave accents" should go.

^ permalink raw reply	[flat|nested] 101+ messages in thread

* Re: [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution
  2014-03-25 17:22 ` [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution Elia Pinto
  2014-03-25 19:57   ` Junio C Hamano
@ 2014-03-26  6:57   ` Matthieu Moy
  1 sibling, 0 replies; 101+ messages in thread
From: Matthieu Moy @ 2014-03-26  6:57 UTC (permalink / raw)
  To: Elia Pinto; +Cc: git

Elia Pinto <gitter.spiros@gmail.com> writes:

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

What does this do in the case there are multiple ` on the same line?
(nested backquotes or multiple `...` `...` on the same line)

There are not many instances, and it seems no nested backquotes in Git's
source code:

$ git grep '`.*`.*`' -- '*.sh'
t/t5506-remote-groups.sh:       if test "`git log -1 --pretty=format:%s $1 --`" = "`cat mark`"; then
t/t9300-fast-import.sh:  test `git rev-parse master` = `git rev-parse TEMP_TAG^`'
t/t9300-fast-import.sh:  test `git rev-parse N2^{tree}` = `git rev-parse N3^{tree}`'
t/t9300-fast-import.sh:  test `git rev-parse N3` = `git rev-parse O1`'
t/t9300-fast-import.sh:  test `git rev-parse N3` = `git rev-parse O2`'
t/t9300-fast-import.sh:  test `git rev-parse refs/tags/O3-2nd` = `git rev-parse O3^` &&

The instance in t5506-remote-groups.sh is correct (probably fixed by
hand, which would deserve to be in the commit message).

I did not receive the patch about t9300-fast-import.sh (the serie seems
to have stopped at PATCH 105/144).

The other problematic case I can think of is `...` in comments. It seems
I caught the problematic ones in t/t0204-gettext-reencode-sanity.sh and
t/t6111-rev-list-treesame.sh, and git-pull.sh was correct already.

$ git grep '#.*`.*`' -- '*.sh'
git-pull.sh:# Setup default fast-forward options via `pull.ff`
t/t0204-gettext-reencode-sanity.sh:#   FreeBSD: `einfaldar` og "tvöfaldar"  [GNU libintl]
t/t4057-diff-combined-paths.sh:# `git diff -c --name-only HEAD HEAD^ HEAD^2`
t/t5522-pull-symlink.sh:# "cd `git rev-parse --show-cdup`", it ended up in the wrong
t/t6111-rev-list-treesame.sh:#    `-C-'          `-*I-*J
t/test-lib-functions.sh:#       for i in `test_seq 100`; do
t/test-lib-functions.sh:#               for j in `test_seq 10 20`; do
t/test-lib-functions.sh:#                       for k in `test_seq a z`; do

Again, something to mention in commit messages I think.

The first review I did was completely manual, but I would not call it a
thorough one.

It's probably a better idea to publish your branch somewhere than to
continue sending batches of 140 emails to the list for this kind of
topics.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 101+ messages in thread

* Re: [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes
  2014-03-25 18:41 ` [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Junio C Hamano
@ 2014-03-26  7:02   ` Matthieu Moy
  2014-03-26  7:44     ` Eric Sunshine
  0 siblings, 1 reply; 101+ messages in thread
From: Matthieu Moy @ 2014-03-26  7:02 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Elia Pinto, git

Junio C Hamano <gitster@pobox.com> writes:

>  - Nobody has time or energy to go through 140+ patches in one go,
>    with enough concentration necessary to do so without making
>    mistakes (this applies to yourself, too---producing mechanical
>    replacement is a no-cost thing, finding mistakes in mechanical
>    replacement takes real effort).

It's a bit less bad than it seems:

 142 files changed, 609 insertions(+), 609 deletions(-)

The first pass I did was a very quick one, but I already went through
the patches I received (apparently not the whole series) and it wasn't
that long.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 101+ messages in thread

* Re: [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes
  2014-03-26  7:02   ` Matthieu Moy
@ 2014-03-26  7:44     ` Eric Sunshine
  2014-03-26  9:41       ` Elia Pinto
  0 siblings, 1 reply; 101+ messages in thread
From: Eric Sunshine @ 2014-03-26  7:44 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: Junio C Hamano, Elia Pinto, Git List

On Wed, Mar 26, 2014 at 3:02 AM, Matthieu Moy
<Matthieu.Moy@grenoble-inp.fr> wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>>  - Nobody has time or energy to go through 140+ patches in one go,
>>    with enough concentration necessary to do so without making
>>    mistakes (this applies to yourself, too---producing mechanical
>>    replacement is a no-cost thing, finding mistakes in mechanical
>>    replacement takes real effort).
>
> It's a bit less bad than it seems:
>
>  142 files changed, 609 insertions(+), 609 deletions(-)
>
> The first pass I did was a very quick one, but I already went through
> the patches I received (apparently not the whole series) and it wasn't
> that long.

I also gave v2 a read-through. Nothing jumped out as a red-flag.

^ permalink raw reply	[flat|nested] 101+ messages in thread

* Re: [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes
  2014-03-26  7:44     ` Eric Sunshine
@ 2014-03-26  9:41       ` Elia Pinto
  0 siblings, 0 replies; 101+ messages in thread
From: Elia Pinto @ 2014-03-26  9:41 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Matthieu Moy, Junio C Hamano, Git List

2014-03-26 8:44 GMT+01:00 Eric Sunshine <sunshine@sunshineco.com>:
> On Wed, Mar 26, 2014 at 3:02 AM, Matthieu Moy
> <Matthieu.Moy@grenoble-inp.fr> wrote:
>> Junio C Hamano <gitster@pobox.com> writes:
>>
>>>  - Nobody has time or energy to go through 140+ patches in one go,
>>>    with enough concentration necessary to do so without making
>>>    mistakes (this applies to yourself, too---producing mechanical
>>>    replacement is a no-cost thing, finding mistakes in mechanical
>>>    replacement takes real effort).
>>
>> It's a bit less bad than it seems:
>>
>>  142 files changed, 609 insertions(+), 609 deletions(-)
>>
>> The first pass I did was a very quick one, but I already went through
>> the patches I received (apparently not the whole series) and it wasn't
>> that long.
>
> I also gave v2 a read-through. Nothing jumped out as a red-flag.

Thank you all. I will change the comment as  the maintainer wishes
(75ee3d7078fbcc3b87a3ae5e0cf42f46256c5da4 for example) and send the
other patches slowly (10 at a time every week, boring but that's
okay).

Best Regards

^ permalink raw reply	[flat|nested] 101+ messages in thread

* Re: [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution
  2014-03-25 20:32     ` David Kastrup
@ 2014-03-26 12:19       ` Matthieu Moy
  0 siblings, 0 replies; 101+ messages in thread
From: Matthieu Moy @ 2014-03-26 12:19 UTC (permalink / raw)
  To: David Kastrup; +Cc: Junio C Hamano, Elia Pinto, git

David Kastrup <dak@gnu.org> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> Elia Pinto <gitter.spiros@gmail.com> writes:
>>
>>> The Git CodingGuidelines prefer the $( ... ) construct for command
>>> substitution instead of using the back-quotes, or grave accents (`..`).
>>>
>>> The backquoted form is the historical 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. Because of this the POSIX shell adopted the $(…) feature from
>>> the Korn shell.
>>>
>>> The patch was generated by the simple script
>>>
>>> for _f in $(find . -name "*.sh")
>>> do
>>>   sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
>>> done
>>
>> "and then carefully proofread" is sorely needed here.
>
> It would already help to skip comment lines.

Actually no: most comments including `...` are code examples that we
want to fix too, except 3 instances (see my other message).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 101+ messages in thread

end of thread, other threads:[~2014-03-26 12:20 UTC | newest]

Thread overview: 101+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-25 17:22 [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
2014-03-25 17:22 ` [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution Elia Pinto
2014-03-25 19:57   ` Junio C Hamano
2014-03-25 20:32     ` David Kastrup
2014-03-26 12:19       ` Matthieu Moy
2014-03-25 20:36     ` Junio C Hamano
2014-03-25 20:38       ` Junio C Hamano
2014-03-26  6:57   ` Matthieu Moy
2014-03-25 17:22 ` [PATCH v2 002/142] git-am.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 003/142] git-pull.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 004/142] git-rebase--merge.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 005/142] git-rebase.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 006/142] git-stash.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 007/142] git-web--browse.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 008/142] unimplemented.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 009/142] t0001-init.sh: " Elia Pinto
2014-03-25 20:02   ` Junio C Hamano
2014-03-25 17:22 ` [PATCH v2 010/142] t0010-racy-git.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 011/142] t0020-crlf.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 012/142] t0025-crlf-auto.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 013/142] t0026-eol-config.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 014/142] t0030-stripspace.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 015/142] t0300-credentials.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 016/142] t1000-read-tree-m-3way.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 017/142] t1001-read-tree-m-2way.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 018/142] t1002-read-tree-m-u-2way.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 019/142] t1003-read-tree-prefix.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 020/142] t1004-read-tree-m-u-wf.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 021/142] t1020-subdirectory.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 022/142] t1050-large.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 023/142] t1100-commit-tree-options.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 024/142] t1401-symbolic-ref.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 025/142] t1410-reflog.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 026/142] t1511-rev-parse-caret.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 027/142] t1512-rev-parse-disambiguation.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 028/142] t2102-update-index-symlinks.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 029/142] t3030-merge-recursive.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 030/142] t3100-ls-tree-restrict.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 031/142] t3101-ls-tree-dirname.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 032/142] t3210-pack-refs.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 033/142] t3403-rebase-skip.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 034/142] t3511-cherry-pick-x.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 035/142] t3600-rm.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 036/142] t3700-add.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 037/142] t3905-stash-include-untracked.sh: " Elia Pinto
2014-03-25 17:22 ` [PATCH v2 038/142] t3910-mac-os-precompose.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 039/142] t4006-diff-mode.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 040/142] t4010-diff-pathspec.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 041/142] t4012-diff-binary.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 042/142] t4013-diff-various.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 043/142] t4014-format-patch.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 044/142] t4036-format-patch-signer-mime.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 045/142] t4038-diff-combined.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 046/142] t4057-diff-combined-paths.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 047/142] t4116-apply-reverse.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 048/142] t4119-apply-config.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 049/142] t4204-patch-id.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 050/142] t5000-tar-tree.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 051/142] t5003-archive-zip.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 052/142] t5100-mailinfo.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 053/142] t5300-pack-object.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 054/142] t5301-sliding-window.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 055/142] t5302-pack-index.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 056/142] t5303-pack-corruption-resilience.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 057/142] t5304-prune.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 058/142] t5305-include-tag.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 059/142] t5500-fetch-pack.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 060/142] t5505-remote.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 061/142] t5506-remote-groups.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 062/142] t5510-fetch.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 063/142] t5515-fetch-merge-logic.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 064/142] t5516-fetch-push.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 065/142] t5517-push-mirror.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 066/142] t5520-pull.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 067/142] t5522-pull-symlink.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 068/142] t5530-upload-pack-error.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 069/142] t5537-fetch-shallow.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 070/142] t5538-push-shallow.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 071/142] t5550-http-fetch-dumb.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 072/142] t5551-http-fetch-smart.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 073/142] t5570-git-daemon.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 074/142] t5601-clone.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 075/142] t5700-clone-reference.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 076/142] t5710-info-alternate.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 077/142] t5900-repo-selection.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 078/142] t6001-rev-list-graft.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 079/142] t6002-rev-list-bisect.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 080/142] t6015-rev-list-show-all-parents.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 081/142] t6032-merge-large-rename.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 082/142] t6034-merge-rename-nocruft.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 083/142] t6132-pathspec-exclude.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 084/142] t7001-mv.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 085/142] t7003-filter-branch.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 086/142] t7004-tag.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 087/142] t7006-pager.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 088/142] t7103-reset-bare.sh: " Elia Pinto
2014-03-25 17:23 ` [PATCH v2 089/142] t7406-submodule-update.sh: " Elia Pinto
2014-03-25 18:41 ` [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Junio C Hamano
2014-03-26  7:02   ` Matthieu Moy
2014-03-26  7:44     ` Eric Sunshine
2014-03-26  9:41       ` Elia Pinto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).