threads / patch / 36288

patch, 144 partscheck-builtins.sh: use the $( ... ) construct for command substitution

Subject: [PATCH 001/144] check-builtins.sh: use the $( ... ) construct for command substitution

## tl;dr

113 messages between Mar 25, 2014 and Mar 29, 2014. Diffs are folded; open one to read it.

replies: 112people: 3as markdown or json

Elia Pinto· Mar 25, 2014, 08:24 UTC · lore

[PATCH 000/144] Use the $( ... ) construct for command substitution instead of using the back-quotes

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.

Elia Pinto (144):
  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
  t0204-gettext-reencode-sanity.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
  t6111-rev-list-treesame.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/t0204-gettext-reencode-sanity.sh              |    2 +-
 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/t6111-rev-list-treesame.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 +-
 144 files changed, 611 insertions(+), 611 deletions(-)
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 check-builtins.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to check-builtins.sh +2 −2
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
Matthieu Moy· Mar 25, 2014, 08:35 UTC · re: Elia Pinto · lore

Re: [PATCH 001/144] check-builtins.sh: use the $( ... ) construct for command substitution

Elia Pinto <gitter.spiros@gmail.com> writes:
> and is supported by POSIX. However,all but the simplest uses become
Missing space after comma.
> complicated quickly. In particular,embedded command substitutions
Ditto.

(neither should block merging, but they would be worth fixing if you need a reroll)

Did you do these 144 patches by hand, or did you use a script (e.g. perl substitution or so) to do it? If the later, then you should include explanations in your commit message.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Elia Pinto· Mar 25, 2014, 10:03 UTC · re: Matthieu Moy · lore

Re: [PATCH 001/144] check-builtins.sh: use the $( ... ) construct for command substitution

2014-03-25 9:35 GMT+01:00 Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>:
Show 16 quoted lines
> Elia Pinto <gitter.spiros@gmail.com> writes:
>
>> and is supported by POSIX. However,all but the simplest uses become
>
> Missing space after comma.
>
>> complicated quickly. In particular,embedded command substitutions
>
> Ditto.
>
> (neither should block merging, but they would be worth fixing if you
> need a reroll)
>
> Did you do these 144 patches by hand, or did you use a script (e.g. perl
> substitution or so) to do it? If the later, then you should include
> explanations in your commit message.
I had used a toy sed script. No bulletproof.  Then I did a manual review.
I review the patch series, adjust the comment was added, and resend the V2.
Thanks again
>
> --
> Matthieu Moy
> http://www-verimag.imag.fr/~moy/
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 002/144] git-am.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-am.sh |   30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)
Show changes to git-am.sh +15 −15
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 003/144] git-pull.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-pull.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to git-pull.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 004/144] git-rebase--merge.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-rebase--merge.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to git-rebase--merge.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 005/144] git-rebase.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-rebase.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to git-rebase.sh +4 −4
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 006/144] git-stash.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-stash.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to git-stash.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 007/144] git-web--browse.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 git-web--browse.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Show changes to git-web--browse.sh +3 −3
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 008/144] unimplemented.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 unimplemented.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to unimplemented.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 009/144] t0001-init.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0001-init.sh |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Show changes to t/t0001-init.sh +6 −6
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 010/144] t0010-racy-git.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0010-racy-git.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t0010-racy-git.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 011/144] t0020-crlf.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0020-crlf.sh |   42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)
Show changes to t/t0020-crlf.sh +21 −21
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 012/144] t0025-crlf-auto.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0025-crlf-auto.sh |   38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)
Show changes to t/t0025-crlf-auto.sh +19 −19
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 013/144] t0026-eol-config.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0026-eol-config.sh |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
Show changes to t/t0026-eol-config.sh +10 −10
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 014/144] t0030-stripspace.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0030-stripspace.sh |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
Show changes to t/t0030-stripspace.sh +10 −10
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 015/144] t0204-gettext-reencode-sanity.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0204-gettext-reencode-sanity.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t0204-gettext-reencode-sanity.sh +1 −1
diff --git a/t/t0204-gettext-reencode-sanity.sh b/t/t0204-gettext-reencode-sanity.sh
index 8437e51..fc9f21e 100755
--- a/t/t0204-gettext-reencode-sanity.sh
+++ b/t/t0204-gettext-reencode-sanity.sh
@@ -58,7 +58,7 @@ test_expect_success GETTEXT_LOCALE 'gettext: Fetching a UTF-8 msgid -> UTF-8' '
 # How these quotes get transliterated depends on the gettext implementation:
 #
 #   Debian:  ,einfaldar' og ,,tvöfaldar" [GNU libintl]
-#   FreeBSD: `einfaldar` og "tvöfaldar"  [GNU libintl]
+#   FreeBSD: $(einfaldar) og "tvöfaldar"  [GNU libintl]
 #   Solaris: ?einfaldar? og ?tvöfaldar?  [Solaris libintl]
 #
 # Just make sure the contents are transliterated, and don't use grep -q
-- 
1.7.10.4
Matthieu Moy· Mar 25, 2014, 08:36 UTC · re: Elia Pinto · lore

Re: [PATCH 015/144] t0204-gettext-reencode-sanity.sh: use the $( ... ) construct for command substitution

Elia Pinto <gitter.spiros@gmail.com> writes:
Show 9 quoted lines
> --- a/t/t0204-gettext-reencode-sanity.sh
> +++ b/t/t0204-gettext-reencode-sanity.sh
> @@ -58,7 +58,7 @@ test_expect_success GETTEXT_LOCALE 'gettext: Fetching a UTF-8 msgid -> UTF-8' '
>  # How these quotes get transliterated depends on the gettext implementation:
>  #
>  #   Debian:  ,einfaldar' og ,,tvöfaldar" [GNU libintl]
> -#   FreeBSD: `einfaldar` og "tvöfaldar"  [GNU libintl]
> +#   FreeBSD: $(einfaldar) og "tvöfaldar"  [GNU libintl]
>  #   Solaris: ?einfaldar? og ?tvöfaldar?  [Solaris libintl]
I don't think you wanted this to be changed.
-- 
Matthieu Moy
Elia Pinto· Mar 25, 2014, 09:51 UTC · re: Matthieu Moy · lore

Re: [PATCH 015/144] t0204-gettext-reencode-sanity.sh: use the $( ... ) construct for command substitution

2014-03-25 9:36 GMT+01:00 Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>:
Show 13 quoted lines
> Elia Pinto <gitter.spiros@gmail.com> writes:
>
>> --- a/t/t0204-gettext-reencode-sanity.sh
>> +++ b/t/t0204-gettext-reencode-sanity.sh
>> @@ -58,7 +58,7 @@ test_expect_success GETTEXT_LOCALE 'gettext: Fetching a UTF-8 msgid -> UTF-8' '
>>  # How these quotes get transliterated depends on the gettext implementation:
>>  #
>>  #   Debian:  ,einfaldar' og ,,tvöfaldar" [GNU libintl]
>> -#   FreeBSD: `einfaldar` og "tvöfaldar"  [GNU libintl]
>> +#   FreeBSD: $(einfaldar) og "tvöfaldar"  [GNU libintl]
>>  #   Solaris: ?einfaldar? og ?tvöfaldar?  [Solaris libintl]
>
> I don't think you wanted this to be changed.

Certainly not. The change was made by an automated script, can happen that i missed something.

Please skip this patch.
Thank you very much for the review.
Elia
>
> --
> Matthieu Moy
> http://www-verimag.imag.fr/~moy/
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 016/144] t0300-credentials.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t0300-credentials.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t0300-credentials.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 017/144] t1000-read-tree-m-3way.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1000-read-tree-m-3way.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t1000-read-tree-m-3way.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 018/144] t1001-read-tree-m-2way.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1001-read-tree-m-2way.sh |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
Show changes to t/t1001-read-tree-m-2way.sh +9 −9
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 019/144] t1002-read-tree-m-u-2way.sh: use the $( ... ) construct for command substitution

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.

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(-)
Show changes to t/t1002-read-tree-m-u-2way.sh +5 −5
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 020/144] t1003-read-tree-prefix.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1003-read-tree-prefix.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t1003-read-tree-prefix.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 021/144] t1004-read-tree-m-u-wf.sh: use the $( ... ) construct for command substitution

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.

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(-)
Show changes to t/t1004-read-tree-m-u-wf.sh +4 −4
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 022/144] t1020-subdirectory.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1020-subdirectory.sh |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
Show changes to t/t1020-subdirectory.sh +11 −11
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 023/144] t1050-large.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1050-large.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t1050-large.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 024/144] t1100-commit-tree-options.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1100-commit-tree-options.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t1100-commit-tree-options.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 025/144] t1401-symbolic-ref.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1401-symbolic-ref.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t1401-symbolic-ref.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 026/144] t1410-reflog.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1410-reflog.sh |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
Show changes to t/t1410-reflog.sh +12 −12
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 027/144] t1511-rev-parse-caret.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1511-rev-parse-caret.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t1511-rev-parse-caret.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 028/144] t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t1512-rev-parse-disambiguation.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to t/t1512-rev-parse-disambiguation.sh +4 −4
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 029/144] t2102-update-index-symlinks.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t2102-update-index-symlinks.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t2102-update-index-symlinks.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 030/144] t3030-merge-recursive.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3030-merge-recursive.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t3030-merge-recursive.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 031/144] t3100-ls-tree-restrict.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3100-ls-tree-restrict.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t3100-ls-tree-restrict.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 032/144] t3101-ls-tree-dirname.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3101-ls-tree-dirname.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t3101-ls-tree-dirname.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 033/144] t3210-pack-refs.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3210-pack-refs.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t3210-pack-refs.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 034/144] t3403-rebase-skip.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3403-rebase-skip.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t3403-rebase-skip.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 035/144] t3511-cherry-pick-x.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3511-cherry-pick-x.sh |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
Show changes to t/t3511-cherry-pick-x.sh +7 −7
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 036/144] t3600-rm.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3600-rm.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t3600-rm.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 037/144] t3700-add.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3700-add.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Show changes to t/t3700-add.sh +8 −8
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 038/144] t3905-stash-include-untracked.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3905-stash-include-untracked.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t3905-stash-include-untracked.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 039/144] t3910-mac-os-precompose.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t3910-mac-os-precompose.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Show changes to t/t3910-mac-os-precompose.sh +8 −8
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 040/144] t4006-diff-mode.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4006-diff-mode.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t4006-diff-mode.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 041/144] t4010-diff-pathspec.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4010-diff-pathspec.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t4010-diff-pathspec.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 042/144] t4012-diff-binary.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4012-diff-binary.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Show changes to t/t4012-diff-binary.sh +8 −8
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 043/144] t4013-diff-various.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4013-diff-various.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Show changes to t/t4013-diff-various.sh +3 −3
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 044/144] t4014-format-patch.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4014-format-patch.sh |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Show changes to t/t4014-format-patch.sh +5 −5
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 045/144] t4036-format-patch-signer-mime.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4036-format-patch-signer-mime.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t4036-format-patch-signer-mime.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 046/144] t4038-diff-combined.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4038-diff-combined.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t4038-diff-combined.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 047/144] t4057-diff-combined-paths.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4057-diff-combined-paths.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t4057-diff-combined-paths.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 048/144] t4116-apply-reverse.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4116-apply-reverse.sh |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Show changes to t/t4116-apply-reverse.sh +6 −6
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 049/144] t4119-apply-config.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4119-apply-config.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t4119-apply-config.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 050/144] t4204-patch-id.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t4204-patch-id.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t4204-patch-id.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 051/144] t5000-tar-tree.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5000-tar-tree.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Show changes to t/t5000-tar-tree.sh +3 −3
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 052/144] t5003-archive-zip.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5003-archive-zip.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5003-archive-zip.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 053/144] t5100-mailinfo.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5100-mailinfo.sh |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Show changes to t/t5100-mailinfo.sh +6 −6
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
Elia Pinto· Mar 25, 2014, 08:24 UTC · re: Elia Pinto · lore

[PATCH 054/144] t5300-pack-object.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5300-pack-object.sh |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
Show changes to t/t5300-pack-object.sh +9 −9
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 055/144] t5301-sliding-window.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5301-sliding-window.sh |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
Show changes to t/t5301-sliding-window.sh +7 −7
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 056/144] t5302-pack-index.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5302-pack-index.sh |   34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)
Show changes to t/t5302-pack-index.sh +17 −17
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 057/144] t5303-pack-corruption-resilience.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5303-pack-corruption-resilience.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to t/t5303-pack-corruption-resilience.sh +4 −4
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 058/144] t5304-prune.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5304-prune.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5304-prune.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 059/144] t5305-include-tag.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5305-include-tag.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to t/t5305-include-tag.sh +4 −4
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 060/144] t5500-fetch-pack.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5500-fetch-pack.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Show changes to t/t5500-fetch-pack.sh +8 −8
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 061/144] t5505-remote.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5505-remote.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5505-remote.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 062/144] t5506-remote-groups.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5506-remote-groups.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5506-remote-groups.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 063/144] t5510-fetch.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5510-fetch.sh |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Show changes to t/t5510-fetch.sh +5 −5
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 064/144] t5515-fetch-merge-logic.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5515-fetch-merge-logic.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t5515-fetch-merge-logic.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 065/144] t5516-fetch-push.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5516-fetch-push.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t5516-fetch-push.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 066/144] t5517-push-mirror.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5517-push-mirror.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5517-push-mirror.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 067/144] t5520-pull.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5520-pull.sh |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Show changes to t/t5520-pull.sh +5 −5
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 068/144] t5522-pull-symlink.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5522-pull-symlink.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5522-pull-symlink.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 069/144] t5530-upload-pack-error.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5530-upload-pack-error.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5530-upload-pack-error.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 070/144] t5537-fetch-shallow.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5537-fetch-shallow.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t5537-fetch-shallow.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 071/144] t5538-push-shallow.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5538-push-shallow.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t5538-push-shallow.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 072/144] t5550-http-fetch-dumb.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5550-http-fetch-dumb.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to t/t5550-http-fetch-dumb.sh +4 −4
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 073/144] t5551-http-fetch-smart.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5551-http-fetch-smart.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5551-http-fetch-smart.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 074/144] t5570-git-daemon.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5570-git-daemon.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to t/t5570-git-daemon.sh +4 −4
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 075/144] t5601-clone.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5601-clone.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5601-clone.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 076/144] t5700-clone-reference.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5700-clone-reference.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5700-clone-reference.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 077/144] t5710-info-alternate.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5710-info-alternate.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5710-info-alternate.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 078/144] t5900-repo-selection.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t5900-repo-selection.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t5900-repo-selection.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 079/144] t6001-rev-list-graft.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6001-rev-list-graft.sh |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Show changes to t/t6001-rev-list-graft.sh +6 −6
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 080/144] t6002-rev-list-bisect.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6002-rev-list-bisect.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Show changes to t/t6002-rev-list-bisect.sh +3 −3
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 081/144] t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for command substitution

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.

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(-)
Show changes to t/t6015-rev-list-show-all-parents.sh +3 −3
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 082/144] t6032-merge-large-rename.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6032-merge-large-rename.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t6032-merge-large-rename.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 083/144] t6034-merge-rename-nocruft.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6034-merge-rename-nocruft.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t6034-merge-rename-nocruft.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 084/144] t6111-rev-list-treesame.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6111-rev-list-treesame.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t6111-rev-list-treesame.sh +1 −1
diff --git a/t/t6111-rev-list-treesame.sh b/t/t6111-rev-list-treesame.sh
index 88b84df..3971c31 100755
--- a/t/t6111-rev-list-treesame.sh
+++ b/t/t6111-rev-list-treesame.sh
@@ -4,7 +4,7 @@
 #       /        \ /             \*
 # *A--*B---D--*F-*G---------K-*L-*M
 #   \     /*       \       /
-#    `-C-'          `-*I-*J
+#    $(-C-'          )-*I-*J
 #
 # A creates "file", B and F change it.
 # Odd merge G takes the old version from B.
-- 
1.7.10.4
Matthieu Moy· Mar 25, 2014, 08:52 UTC · re: Elia Pinto · lore

Re: [PATCH 084/144] t6111-rev-list-treesame.sh: use the $( ... ) construct for command substitution

Elia Pinto <gitter.spiros@gmail.com> writes:
Show 8 quoted lines
> --- a/t/t6111-rev-list-treesame.sh
> +++ b/t/t6111-rev-list-treesame.sh
> @@ -4,7 +4,7 @@
>  #       /        \ /             \*
>  # *A--*B---D--*F-*G---------K-*L-*M
>  #   \     /*       \       /
> -#    `-C-'          `-*I-*J
> +#    $(-C-'          )-*I-*J
The original version was more readable ;-).
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Elia Pinto· Mar 25, 2014, 09:52 UTC · re: Matthieu Moy · lore

Re: [PATCH 084/144] t6111-rev-list-treesame.sh: use the $( ... ) construct for command substitution

2014-03-25 9:52 GMT+01:00 Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>:
Show 12 quoted lines
> Elia Pinto <gitter.spiros@gmail.com> writes:
>
>> --- a/t/t6111-rev-list-treesame.sh
>> +++ b/t/t6111-rev-list-treesame.sh
>> @@ -4,7 +4,7 @@
>>  #       /        \ /             \*
>>  # *A--*B---D--*F-*G---------K-*L-*M
>>  #   \     /*       \       /
>> -#    `-C-'          `-*I-*J
>> +#    $(-C-'          )-*I-*J
>
> The original version was more readable ;-).
:=)

I am sorry. The change was made by an automated script, can happen that i missed something.

Please skip this patch.
Thank you very much for the review.
Elia
Show 5 quoted lines
>
>
> --
> Matthieu Moy
> http://www-verimag.imag.fr/~moy/
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 085/144] t6132-pathspec-exclude.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t6132-pathspec-exclude.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t6132-pathspec-exclude.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 086/144] t7001-mv.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7001-mv.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t7001-mv.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 087/144] t7003-filter-branch.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7003-filter-branch.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Show changes to t/t7003-filter-branch.sh +3 −3
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 088/144] t7004-tag.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7004-tag.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Show changes to t/t7004-tag.sh +8 −8
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 089/144] t7006-pager.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7006-pager.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t7006-pager.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 090/144] t7103-reset-bare.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7103-reset-bare.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t7103-reset-bare.sh +1 −1
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 091/144] t7406-submodule-update.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7406-submodule-update.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t7406-submodule-update.sh +2 −2
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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 092/144] t7408-submodule-reference.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7408-submodule-reference.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t7408-submodule-reference.sh +1 −1
diff --git a/t/t7408-submodule-reference.sh b/t/t7408-submodule-reference.sh
index b770b2f..eaea19b 100755
--- a/t/t7408-submodule-reference.sh
+++ b/t/t7408-submodule-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
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 093/144] t7504-commit-msg-hook.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7504-commit-msg-hook.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t7504-commit-msg-hook.sh +1 −1
diff --git a/t/t7504-commit-msg-hook.sh b/t/t7504-commit-msg-hook.sh
index 1f53ea8..8728db6 100755
--- a/t/t7504-commit-msg-hook.sh
+++ b/t/t7504-commit-msg-hook.sh
@@ -179,7 +179,7 @@ EOF
 chmod +x "$HOOK"
 
 commit_msg_is () {
-	test "`git log --pretty=format:%s%b -1`" = "$1"
+	test "$(git log --pretty=format:%s%b -1)" = "$1"
 }
 
 test_expect_success 'hook edits commit message' '
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 094/144] t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7505-prepare-commit-msg-hook.sh |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
Show changes to t/t7505-prepare-commit-msg-hook.sh +16 −16
diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh
index 3573751..e3baf16 100755
--- a/t/t7505-prepare-commit-msg-hook.sh
+++ b/t/t7505-prepare-commit-msg-hook.sh
@@ -53,7 +53,7 @@ test_expect_success 'with hook (-m)' '
 	echo "more" >> file &&
 	git add file &&
 	git commit -m "more" &&
-	test "`git log -1 --pretty=format:%s`" = "message (no editor)"
+	test "$(git log -1 --pretty=format:%s)" = "message (no editor)"
 
 '
 
@@ -62,7 +62,7 @@ test_expect_success 'with hook (-m editor)' '
 	echo "more" >> file &&
 	git add file &&
 	GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -e -m "more more" &&
-	test "`git log -1 --pretty=format:%s`" = message
+	test "$(git log -1 --pretty=format:%s)" = message
 
 '
 
@@ -71,7 +71,7 @@ test_expect_success 'with hook (-t)' '
 	echo "more" >> file &&
 	git add file &&
 	git commit -t "$(git rev-parse --git-dir)/template" &&
-	test "`git log -1 --pretty=format:%s`" = template
+	test "$(git log -1 --pretty=format:%s)" = template
 
 '
 
@@ -80,7 +80,7 @@ test_expect_success 'with hook (-F)' '
 	echo "more" >> file &&
 	git add file &&
 	(echo more | git commit -F -) &&
-	test "`git log -1 --pretty=format:%s`" = "message (no editor)"
+	test "$(git log -1 --pretty=format:%s)" = "message (no editor)"
 
 '
 
@@ -89,17 +89,17 @@ test_expect_success 'with hook (-F editor)' '
 	echo "more" >> file &&
 	git add file &&
 	(echo more more | GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -e -F -) &&
-	test "`git log -1 --pretty=format:%s`" = message
+	test "$(git log -1 --pretty=format:%s)" = message
 
 '
 
 test_expect_success 'with hook (-C)' '
 
-	head=`git rev-parse HEAD` &&
+	head=$(git rev-parse HEAD) &&
 	echo "more" >> file &&
 	git add file &&
 	git commit -C $head &&
-	test "`git log -1 --pretty=format:%s`" = "$head (no editor)"
+	test "$(git log -1 --pretty=format:%s)" = "$head (no editor)"
 
 '
 
@@ -108,40 +108,40 @@ test_expect_success 'with hook (editor)' '
 	echo "more more" >> file &&
 	git add file &&
 	GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit &&
-	test "`git log -1 --pretty=format:%s`" = default
+	test "$(git log -1 --pretty=format:%s)" = default
 
 '
 
 test_expect_success 'with hook (--amend)' '
 
-	head=`git rev-parse HEAD` &&
+	head=$(git rev-parse HEAD) &&
 	echo "more" >> file &&
 	git add file &&
 	GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit --amend &&
-	test "`git log -1 --pretty=format:%s`" = "$head"
+	test "$(git log -1 --pretty=format:%s)" = "$head"
 
 '
 
 test_expect_success 'with hook (-c)' '
 
-	head=`git rev-parse HEAD` &&
+	head=$(git rev-parse HEAD) &&
 	echo "more" >> file &&
 	git add file &&
 	GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -c $head &&
-	test "`git log -1 --pretty=format:%s`" = "$head"
+	test "$(git log -1 --pretty=format:%s)" = "$head"
 
 '
 
 test_expect_success 'with hook (merge)' '
 
-	head=`git rev-parse HEAD` &&
+	head=$(git rev-parse HEAD) &&
 	git checkout -b other HEAD@{1} &&
 	echo "more" >> file &&
 	git add file &&
 	git commit -m other &&
 	git checkout - &&
 	git merge other &&
-	test "`git log -1 --pretty=format:%s`" = merge
+	test "$(git log -1 --pretty=format:%s)" = merge
 '
 
 cat > "$HOOK" <<'EOF'
@@ -151,7 +151,7 @@ EOF
 
 test_expect_success 'with failing hook' '
 
-	head=`git rev-parse HEAD` &&
+	head=$(git rev-parse HEAD) &&
 	echo "more" >> file &&
 	git add file &&
 	! GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -c $head
@@ -160,7 +160,7 @@ test_expect_success 'with failing hook' '
 
 test_expect_success 'with failing hook (--no-verify)' '
 
-	head=`git rev-parse HEAD` &&
+	head=$(git rev-parse HEAD) &&
 	echo "more" >> file &&
 	git add file &&
 	! GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit --no-verify -c $head
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 095/144] t7602-merge-octopus-many.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7602-merge-octopus-many.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to t/t7602-merge-octopus-many.sh +4 −4
diff --git a/t/t7602-merge-octopus-many.sh b/t/t7602-merge-octopus-many.sh
index 955f09f..6abe441 100755
--- a/t/t7602-merge-octopus-many.sh
+++ b/t/t7602-merge-octopus-many.sh
@@ -19,7 +19,7 @@ test_expect_success 'setup' '
 		git add c$i.c &&
 		git commit -m c$i &&
 		git tag c$i &&
-		i=`expr $i + 1` || return 1
+		i=$(expr $i + 1) || return 1
 	done
 '
 
@@ -30,7 +30,7 @@ test_expect_success 'merge c1 with c2, c3, c4, ... c29' '
 	while test $i -le 30
 	do
 		refs="$refs c$i"
-		i=`expr $i + 1`
+		i=$(expr $i + 1)
 	done &&
 	git merge $refs &&
 	test "$(git rev-parse c1)" != "$(git rev-parse HEAD)" &&
@@ -38,14 +38,14 @@ test_expect_success 'merge c1 with c2, c3, c4, ... c29' '
 	while test $i -le 30
 	do
 		test "$(git rev-parse c$i)" = "$(git rev-parse HEAD^$i)" &&
-		i=`expr $i + 1` || return 1
+		i=$(expr $i + 1) || return 1
 	done &&
 	git diff --exit-code &&
 	i=1 &&
 	while test $i -le 30
 	do
 		test -f c$i.c &&
-		i=`expr $i + 1` || return 1
+		i=$(expr $i + 1) || return 1
 	done
 '
 
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 096/144] t7700-repack.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t7700-repack.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t7700-repack.sh +2 −2
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index 284018e..ced4417 100755
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
@@ -53,7 +53,7 @@ test_expect_success 'writing bitmaps can duplicate .keep objects' '
 
 test_expect_success 'loose objects in alternate ODB are not repacked' '
 	mkdir alt_objects &&
-	echo `pwd`/alt_objects > .git/objects/info/alternates &&
+	echo $(pwd)/alt_objects > .git/objects/info/alternates &&
 	echo content3 > file3 &&
 	objsha1=$(GIT_OBJECT_DIRECTORY=alt_objects git hash-object -w file3) &&
 	git add file3 &&
@@ -152,7 +152,7 @@ test_expect_success 'packed unreachable obs in alternate ODB are not loosened' '
 '
 
 test_expect_success 'local packed unreachable obs that exist in alternate ODB are not loosened' '
-	echo `pwd`/alt_objects > .git/objects/info/alternates &&
+	echo $(pwd)/alt_objects > .git/objects/info/alternates &&
 	echo "$csha1" | git pack-objects --non-empty --all --reflog pack &&
 	rm -f .git/objects/pack/* &&
 	mv pack-* .git/objects/pack/ &&
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 097/144] t8003-blame-corner-cases.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t8003-blame-corner-cases.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t8003-blame-corner-cases.sh +2 −2
diff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh
index e7cac1d..4216d08 100755
--- a/t/t8003-blame-corner-cases.sh
+++ b/t/t8003-blame-corner-cases.sh
@@ -153,7 +153,7 @@ test_expect_success 'blame path that used to be a directory' '
 '
 
 test_expect_success 'blame to a commit with no author name' '
-  TREE=`git rev-parse HEAD:`
+  TREE=$(git rev-parse HEAD:)
   cat >badcommit <<EOF
 tree $TREE
 author <noname> 1234567890 +0000
@@ -161,7 +161,7 @@ committer David Reiss <dreiss@facebook.com> 1234567890 +0000
 
 some message
 EOF
-  COMMIT=`git hash-object -t commit -w badcommit`
+  COMMIT=$(git hash-object -t commit -w badcommit)
   git --no-pager blame $COMMIT -- uno >/dev/null
 '
 
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 098/144] t9001-send-email.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t9001-send-email.sh |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Show changes to t/t9001-send-email.sh +5 −5
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 1ecdacb..149a5b1 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -34,7 +34,7 @@ clean_fake_sendmail() {
 }
 
 test_expect_success $PREREQ 'Extract patches' '
-    patches=`git format-patch -s --cc="One <one@example.com>" --cc=two@example.com -n HEAD^1`
+    patches=$(git format-patch -s --cc="One <one@example.com>" --cc=two@example.com -n HEAD^1)
 '
 
 # Test no confirm early to ensure remaining tests will not hang
@@ -1158,7 +1158,7 @@ test_expect_success $PREREQ '--no-bcc overrides sendemail.bcc' '
 '
 
 test_expect_success $PREREQ 'patches To headers are used by default' '
-	patch=`git format-patch -1 --to="bodies@example.com"` &&
+	patch=$(git format-patch -1 --to="bodies@example.com") &&
 	test_when_finished "rm $patch" &&
 	git send-email \
 		--dry-run \
@@ -1169,7 +1169,7 @@ test_expect_success $PREREQ 'patches To headers are used by default' '
 '
 
 test_expect_success $PREREQ 'patches To headers are appended to' '
-	patch=`git format-patch -1 --to="bodies@example.com"` &&
+	patch=$(git format-patch -1 --to="bodies@example.com") &&
 	test_when_finished "rm $patch" &&
 	git send-email \
 		--dry-run \
@@ -1182,8 +1182,8 @@ test_expect_success $PREREQ 'patches To headers are appended to' '
 '
 
 test_expect_success $PREREQ 'To headers from files reset each patch' '
-	patch1=`git format-patch -1 --to="bodies@example.com"` &&
-	patch2=`git format-patch -1 --to="other@example.com" HEAD~` &&
+	patch1=$(git format-patch -1 --to="bodies@example.com") &&
+	patch2=$(git format-patch -1 --to="other@example.com" HEAD~) &&
 	test_when_finished "rm $patch1 && rm $patch2" &&
 	git send-email \
 		--dry-run \
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 099/144] t9101-git-svn-props.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t9101-git-svn-props.sh |   30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)
Show changes to t/t9101-git-svn-props.sh +15 −15
diff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh
index 8869f50..e8173d5 100755
--- a/t/t9101-git-svn-props.sh
+++ b/t/t9101-git-svn-props.sh
@@ -26,27 +26,27 @@ cd import
 EOF
 
 	printf "Hello\r\nWorld\r\n" > crlf
-	a_crlf=`git hash-object -w crlf`
+	a_crlf=$(git hash-object -w crlf)
 	printf "Hello\rWorld\r" > cr
-	a_cr=`git hash-object -w cr`
+	a_cr=$(git hash-object -w cr)
 	printf "Hello\nWorld\n" > lf
-	a_lf=`git hash-object -w lf`
+	a_lf=$(git hash-object -w lf)
 
 	printf "Hello\r\nWorld" > ne_crlf
-	a_ne_crlf=`git hash-object -w ne_crlf`
+	a_ne_crlf=$(git hash-object -w ne_crlf)
 	printf "Hello\nWorld" > ne_lf
-	a_ne_lf=`git hash-object -w ne_lf`
+	a_ne_lf=$(git hash-object -w ne_lf)
 	printf "Hello\rWorld" > ne_cr
-	a_ne_cr=`git hash-object -w ne_cr`
+	a_ne_cr=$(git hash-object -w ne_cr)
 
 	touch empty
-	a_empty=`git hash-object -w empty`
+	a_empty=$(git hash-object -w empty)
 	printf "\n" > empty_lf
-	a_empty_lf=`git hash-object -w empty_lf`
+	a_empty_lf=$(git hash-object -w empty_lf)
 	printf "\r" > empty_cr
-	a_empty_cr=`git hash-object -w empty_cr`
+	a_empty_cr=$(git hash-object -w empty_cr)
 	printf "\r\n" > empty_crlf
-	a_empty_crlf=`git hash-object -w empty_crlf`
+	a_empty_crlf=$(git hash-object -w empty_crlf)
 
 	svn_cmd import --no-auto-props -m 'import for git svn' . "$svnrepo" >/dev/null
 cd ..
@@ -80,7 +80,7 @@ test_expect_success "$name" \
 	git pull . ${remotes_git_svn}'
 
 expect='/* $Id$ */'
-got="`sed -ne 2p kw.c`"
+got="$(sed -ne 2p kw.c)"
 test_expect_success 'raw $Id$ found in kw.c' "test '$expect' = '$got'"
 
 test_expect_success "propset CR on crlf files" '
@@ -107,8 +107,8 @@ done
 cd test_wc
 	printf '$Id$\rHello\rWorld\r' > cr
 	printf '$Id$\rHello\rWorld' > ne_cr
-	a_cr=`printf '$Id$\r\nHello\r\nWorld\r\n' | git hash-object --stdin`
-	a_ne_cr=`printf '$Id$\r\nHello\r\nWorld' | git hash-object --stdin`
+	a_cr=$(printf '$Id$\r\nHello\r\nWorld\r\n' | git hash-object --stdin)
+	a_ne_cr=$(printf '$Id$\r\nHello\r\nWorld' | git hash-object --stdin)
 	test_expect_success 'Set CRLF on cr files' \
 	'svn_cmd propset svn:eol-style CRLF cr &&
 	 svn_cmd propset svn:eol-style CRLF ne_cr &&
@@ -119,8 +119,8 @@ cd ..
 test_expect_success 'fetch and pull latest from svn' \
 	'git svn fetch && git pull . ${remotes_git_svn}'
 
-b_cr="`git hash-object cr`"
-b_ne_cr="`git hash-object ne_cr`"
+b_cr="$(git hash-object cr)"
+b_ne_cr="$(git hash-object ne_cr)"
 
 test_expect_success 'CRLF + $Id$' "test '$a_cr' = '$b_cr'"
 test_expect_success 'CRLF + $Id$ (no newline)' "test '$a_ne_cr' = '$b_ne_cr'"
-- 
1.7.10.4
Eric Wong· Mar 29, 2014, 23:50 UTC · re: Elia Pinto · lore

Re: [PATCH 099/144] t9101-git-svn-props.sh: use the $( ... ) construct for command substitution

Elia Pinto <gitter.spiros@gmail.com> wrote:
> The Git CodingGuidelines prefer the $( ... ) construct for command
> substitution instead of using the back-quotes, or grave accents (`..`).
I did not check very closely, but for the git-svn tests:
Acked-by: Eric Wong <normalperson@yhbt.net>
Thanks.
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 100/144] t9104-git-svn-follow-parent.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t9104-git-svn-follow-parent.sh |   48 +++++++++++++++++++-------------------
 1 file changed, 24 insertions(+), 24 deletions(-)
Show changes to t/t9104-git-svn-follow-parent.sh +24 −24
diff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh
index 13b179e..101f545 100755
--- a/t/t9104-git-svn-follow-parent.sh
+++ b/t/t9104-git-svn-follow-parent.sh
@@ -31,8 +31,8 @@ test_expect_success 'initialize repo' '
 test_expect_success 'init and fetch a moved directory' '
 	git svn init --minimize-url -i thunk "$svnrepo"/thunk &&
 	git svn fetch -i thunk &&
-	test "`git rev-parse --verify refs/remotes/thunk@2`" \
-           = "`git rev-parse --verify refs/remotes/thunk~1`" &&
+	test "$(git rev-parse --verify refs/remotes/thunk@2)" \
+           = "$(git rev-parse --verify refs/remotes/thunk~1)" &&
         test "`git cat-file blob refs/remotes/thunk:readme |\
                  sed -n -e "3p"`" = goodbye &&
 	test -z "`git config --get svn-remote.svn.fetch \
@@ -46,8 +46,8 @@ test_expect_success 'init and fetch from one svn-remote' '
         git config --add svn-remote.svn.fetch \
           thunk:refs/remotes/svn/thunk &&
         git svn fetch -i svn/thunk &&
-	test "`git rev-parse --verify refs/remotes/svn/trunk`" \
-           = "`git rev-parse --verify refs/remotes/svn/thunk~1`" &&
+	test "$(git rev-parse --verify refs/remotes/svn/trunk)" \
+           = "$(git rev-parse --verify refs/remotes/svn/thunk~1)" &&
         test "`git cat-file blob refs/remotes/svn/thunk:readme |\
                  sed -n -e "3p"`" = goodbye
         '
@@ -61,9 +61,9 @@ test_expect_success 'follow deleted parent' '
           junk:refs/remotes/svn/junk &&
         git svn fetch -i svn/thunk &&
         git svn fetch -i svn/junk &&
-        test -z "`git diff svn/junk svn/trunk`" &&
-        test "`git merge-base svn/junk svn/trunk`" \
-           = "`git rev-parse svn/trunk`"
+        test -z "$(git diff svn/junk svn/trunk)" &&
+        test "$(git merge-base svn/junk svn/trunk)" \
+           = "$(git rev-parse svn/trunk)"
         '
 
 test_expect_success 'follow larger parent' '
@@ -80,7 +80,7 @@ test_expect_success 'follow larger parent' '
         test "`git merge-base \
                  refs/remotes/larger-parent/trunk/thunk/bump/thud \
                  refs/remotes/larger`" = \
-             "`git rev-parse refs/remotes/larger`"
+             "$(git rev-parse refs/remotes/larger)"
         true
         '
 
@@ -104,8 +104,8 @@ test_expect_success 'follow deleted directory' '
 	svn_cmd rm -m "remove glob" "$svnrepo"/glob &&
 	git svn init --minimize-url -i glob "$svnrepo"/glob &&
 	git svn fetch -i glob &&
-	test "`git cat-file blob refs/remotes/glob:blob/bye`" = hi &&
-	test "`git ls-tree refs/remotes/glob | wc -l `" -eq 1
+	test "$(git cat-file blob refs/remotes/glob:blob/bye)" = hi &&
+	test "$(git ls-tree refs/remotes/glob | wc -l )" -eq 1
 	'
 
 # ref: r9270 of the Subversion repository: (http://svn.collab.net/repos/svn)
@@ -140,9 +140,9 @@ test_expect_success 'follow-parent avoids deleting relevant info' '
 	git svn init --minimize-url -i r9270-t \
 	  "$svnrepo"/r9270/trunk/subversion/bindings/swig/perl/native/t &&
 	git svn fetch -i r9270-t &&
-	test `git rev-list r9270-t | wc -l` -eq 2 &&
-	test "`git ls-tree --name-only r9270-t~1`" = \
-	     "`git ls-tree --name-only r9270-t`"
+	test $(git rev-list r9270-t | wc -l) -eq 2 &&
+	test "$(git ls-tree --name-only r9270-t~1)" = \
+	     "$(git ls-tree --name-only r9270-t)"
 	'
 
 test_expect_success "track initial change if it was only made to parent" '
@@ -150,11 +150,11 @@ test_expect_success "track initial change if it was only made to parent" '
 	git svn init --minimize-url -i r9270-d \
 	  "$svnrepo"/r9270/drunk/subversion/bindings/swig/perl/native/t &&
 	git svn fetch -i r9270-d &&
-	test `git rev-list r9270-d | wc -l` -eq 3 &&
-	test "`git ls-tree --name-only r9270-t`" = \
-	     "`git ls-tree --name-only r9270-d`" &&
-	test "`git rev-parse r9270-t`" = \
-	     "`git rev-parse r9270-d~1`"
+	test $(git rev-list r9270-d | wc -l) -eq 3 &&
+	test "$(git ls-tree --name-only r9270-t)" = \
+	     "$(git ls-tree --name-only r9270-d)" &&
+	test "$(git rev-parse r9270-t)" = \
+	     "$(git rev-parse r9270-d~1)"
 	'
 
 test_expect_success "follow-parent is atomic" '
@@ -191,12 +191,12 @@ test_expect_success "follow-parent is atomic" '
 	git svn fetch -i stunk &&
 	git svn init --minimize-url -i flunked "$svnrepo"/flunked &&
 	git svn fetch -i flunked &&
-	test "`git rev-parse --verify refs/remotes/flunk@18`" \
-	   = "`git rev-parse --verify refs/remotes/stunk`" &&
-	test "`git rev-parse --verify refs/remotes/flunk~1`" \
-	   = "`git rev-parse --verify refs/remotes/stunk`" &&
-	test "`git rev-parse --verify refs/remotes/flunked~1`" \
-	   = "`git rev-parse --verify refs/remotes/stunk~1`"
+	test "$(git rev-parse --verify refs/remotes/flunk@18)" \
+	   = "$(git rev-parse --verify refs/remotes/stunk)" &&
+	test "$(git rev-parse --verify refs/remotes/flunk~1)" \
+	   = "$(git rev-parse --verify refs/remotes/stunk)" &&
+	test "$(git rev-parse --verify refs/remotes/flunked~1)" \
+	   = "$(git rev-parse --verify refs/remotes/stunk~1)"
 	'
 
 test_expect_success "track multi-parent paths" '
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 101/144] t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t9105-git-svn-commit-diff.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to t/t9105-git-svn-commit-diff.sh +2 −2
diff --git a/t/t9105-git-svn-commit-diff.sh b/t/t9105-git-svn-commit-diff.sh
index 5d0afea..6ed5f74 100755
--- a/t/t9105-git-svn-commit-diff.sh
+++ b/t/t9105-git-svn-commit-diff.sh
@@ -18,8 +18,8 @@ test_expect_success 'initialize repo' '
 	git commit -a -m "another"
 	'
 
-head=`git rev-parse --verify HEAD^0`
-prev=`git rev-parse --verify HEAD^1`
+head=$(git rev-parse --verify HEAD^0)
+prev=$(git rev-parse --verify HEAD^1)
 
 # the internals of the commit-diff command are the same as the regular
 # commit, so only a basic test of functionality is needed since we've
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 102/144] t9107-git-svn-migrate.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t9107-git-svn-migrate.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Show changes to t/t9107-git-svn-migrate.sh +8 −8
diff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh
index ee73013..8cb9c2b 100755
--- a/t/t9107-git-svn-migrate.sh
+++ b/t/t9107-git-svn-migrate.sh
@@ -24,10 +24,10 @@ test_expect_success 'setup old-looking metadata' '
 	git update-ref -d refs/${remotes_git_svn} refs/${remotes_git_svn}
 	'
 
-head=`git rev-parse --verify refs/heads/git-svn-HEAD^0`
+head=$(git rev-parse --verify refs/heads/git-svn-HEAD^0)
 test_expect_success 'git-svn-HEAD is a real HEAD' "test -n '$head'"
 
-svnrepo_escaped=`echo $svnrepo | sed 's/ /%20/'`
+svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/')
 
 test_expect_success 'initialize old-style (v0) git svn layout' '
 	mkdir -p "$GIT_DIR"/git-svn/info "$GIT_DIR"/svn/info &&
@@ -38,7 +38,7 @@ test_expect_success 'initialize old-style (v0) git svn layout' '
 	git rev-parse --verify refs/${remotes_git_svn}^0 &&
 	git rev-parse --verify refs/remotes/svn^0 &&
 	test "$(git config --get svn-remote.svn.url)" = "$svnrepo_escaped" &&
-	test `git config --get svn-remote.svn.fetch` = \
+	test $(git config --get svn-remote.svn.fetch) = \
              ":refs/${remotes_git_svn}"
 	'
 
@@ -75,7 +75,7 @@ test_expect_success 'multi-fetch works on partial urls + paths' "
 	for i in trunk a b tags/0.1 tags/0.2 tags/0.3; do
 		git rev-parse --verify refs/remotes/\$i^0 >> refs.out || exit 1;
 	    done &&
-	test -z \"\`sort < refs.out | uniq -d\`\" &&
+	test -z \"\$(sort < refs.out | uniq -d\)\" &&
 	for i in trunk a b tags/0.1 tags/0.2 tags/0.3; do
 	  for j in trunk a b tags/0.1 tags/0.2 tags/0.3; do
 		if test \$j != \$i; then continue; fi
@@ -87,16 +87,16 @@ test_expect_success 'migrate --minimize on old inited layout' '
 	git config --unset-all svn-remote.svn.fetch &&
 	git config --unset-all svn-remote.svn.url &&
 	rm -rf "$GIT_DIR"/svn &&
-	for i in `cat fetch.out`; do
-		path=`expr $i : "\([^:]*\):.*$"`
-		ref=`expr $i : "[^:]*:\(refs/remotes/.*\)$"`
+	for i in $(cat fetch.out); do
+		path=$(expr $i : "\([^:]*\):.*$")
+		ref=$(expr $i : "[^:]*:\(refs/remotes/.*\)$")
 		if test -z "$ref"; then continue; fi
 		if test -n "$path"; then path="/$path"; fi
 		( mkdir -p "$GIT_DIR"/svn/$ref/info/ &&
 		echo "$svnrepo"$path > "$GIT_DIR"/svn/$ref/info/url ) || exit 1;
 	done &&
 	git svn migrate --minimize &&
-	test -z "`git config -l | grep "^svn-remote\.git-svn\."`" &&
+	test -z "$(git config -l | grep "^svn-remote\.git-svn\.")" &&
 	git config --get-all svn-remote.svn.fetch > fetch.out &&
 	grep "^trunk:refs/remotes/trunk$" fetch.out &&
 	grep "^branches/a:refs/remotes/a$" fetch.out &&
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 103/144] t9108-git-svn-glob.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t9108-git-svn-glob.sh |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
Show changes to t/t9108-git-svn-glob.sh +10 −10
diff --git a/t/t9108-git-svn-glob.sh b/t/t9108-git-svn-glob.sh
index d732d31..a526d60 100755
--- a/t/t9108-git-svn-glob.sh
+++ b/t/t9108-git-svn-glob.sh
@@ -50,10 +50,10 @@ test_expect_success 'test refspec globbing' '
 	git log --pretty=oneline refs/remotes/tags/end | \
 	    sed -e "s/^.\{41\}//" > output.end &&
 	test_cmp expect.end output.end &&
-	test "`git rev-parse refs/remotes/tags/end~1`" = \
-		"`git rev-parse refs/remotes/branches/start`" &&
-	test "`git rev-parse refs/remotes/branches/start~2`" = \
-		"`git rev-parse refs/remotes/trunk`" &&
+	test "$(git rev-parse refs/remotes/tags/end~1)" = \
+		"$(git rev-parse refs/remotes/branches/start)" &&
+	test "$(git rev-parse refs/remotes/branches/start~2)" = \
+		"$(git rev-parse refs/remotes/trunk)" &&
 	test_must_fail git rev-parse refs/remotes/tags/end@3
 	'
 
@@ -75,12 +75,12 @@ test_expect_success 'test left-hand-side only globbing' '
 		svn_cmd commit -m "try to try"
 	) &&
 	git svn fetch two &&
-	test `git rev-list refs/remotes/two/tags/end | wc -l` -eq 6 &&
-	test `git rev-list refs/remotes/two/branches/start | wc -l` -eq 3 &&
-	test `git rev-parse refs/remotes/two/branches/start~2` = \
-	     `git rev-parse refs/remotes/two/trunk` &&
-	test `git rev-parse refs/remotes/two/tags/end~3` = \
-	     `git rev-parse refs/remotes/two/branches/start` &&
+	test $(git rev-list refs/remotes/two/tags/end | wc -l) -eq 6 &&
+	test $(git rev-list refs/remotes/two/branches/start | wc -l) -eq 3 &&
+	test $(git rev-parse refs/remotes/two/branches/start~2) = \
+	     $(git rev-parse refs/remotes/two/trunk) &&
+	test $(git rev-parse refs/remotes/two/tags/end~3) = \
+	     $(git rev-parse refs/remotes/two/branches/start) &&
 	git log --pretty=oneline refs/remotes/two/tags/end | \
 	    sed -e "s/^.\{41\}//" > output.two &&
 	test_cmp expect.two output.two
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 104/144] t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t9109-git-svn-multi-glob.sh |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
Show changes to t/t9109-git-svn-multi-glob.sh +16 −16
diff --git a/t/t9109-git-svn-multi-glob.sh b/t/t9109-git-svn-multi-glob.sh
index c318f9f..f36b749 100755
--- a/t/t9109-git-svn-multi-glob.sh
+++ b/t/t9109-git-svn-multi-glob.sh
@@ -50,10 +50,10 @@ test_expect_success 'test refspec globbing' '
 	git log --pretty=oneline refs/remotes/tags/end | \
 	    sed -e "s/^.\{41\}//" > output.end &&
 	test_cmp expect.end output.end &&
-	test "`git rev-parse refs/remotes/tags/end~1`" = \
-		"`git rev-parse refs/remotes/branches/v1/start`" &&
-	test "`git rev-parse refs/remotes/branches/v1/start~2`" = \
-		"`git rev-parse refs/remotes/trunk`" &&
+	test "$(git rev-parse refs/remotes/tags/end~1)" = \
+		"$(git rev-parse refs/remotes/branches/v1/start)" &&
+	test "$(git rev-parse refs/remotes/branches/v1/start~2)" = \
+		"$(git rev-parse refs/remotes/trunk)" &&
 	test_must_fail git rev-parse refs/remotes/tags/end@3
 	'
 
@@ -75,12 +75,12 @@ test_expect_success 'test left-hand-side only globbing' '
 		svn_cmd commit -m "try to try"
 	) &&
 	git svn fetch two &&
-	test `git rev-list refs/remotes/two/tags/end | wc -l` -eq 6 &&
-	test `git rev-list refs/remotes/two/branches/v1/start | wc -l` -eq 3 &&
-	test `git rev-parse refs/remotes/two/branches/v1/start~2` = \
-	     `git rev-parse refs/remotes/two/trunk` &&
-	test `git rev-parse refs/remotes/two/tags/end~3` = \
-	     `git rev-parse refs/remotes/two/branches/v1/start` &&
+	test $(git rev-list refs/remotes/two/tags/end | wc -l) -eq 6 &&
+	test $(git rev-list refs/remotes/two/branches/v1/start | wc -l) -eq 3 &&
+	test $(git rev-parse refs/remotes/two/branches/v1/start~2) = \
+	     $(git rev-parse refs/remotes/two/trunk) &&
+	test $(git rev-parse refs/remotes/two/tags/end~3) = \
+	     $(git rev-parse refs/remotes/two/branches/v1/start) &&
 	git log --pretty=oneline refs/remotes/two/tags/end | \
 	    sed -e "s/^.\{41\}//" > output.two &&
 	test_cmp expect.two output.two
@@ -124,12 +124,12 @@ test_expect_success 'test another branch' '
 	git config --add svn-remote.four.tags \
 	                 "tags/*:refs/remotes/four/tags/*" &&
 	git svn fetch four &&
-	test `git rev-list refs/remotes/four/tags/next | wc -l` -eq 5 &&
-	test `git rev-list refs/remotes/four/branches/v2/start | wc -l` -eq 3 &&
-	test `git rev-parse refs/remotes/four/branches/v2/start~2` = \
-	     `git rev-parse refs/remotes/four/trunk` &&
-	test `git rev-parse refs/remotes/four/tags/next~2` = \
-	     `git rev-parse refs/remotes/four/branches/v2/start` &&
+	test $(git rev-list refs/remotes/four/tags/next | wc -l) -eq 5 &&
+	test $(git rev-list refs/remotes/four/branches/v2/start | wc -l) -eq 3 &&
+	test $(git rev-parse refs/remotes/four/branches/v2/start~2) = \
+	     $(git rev-parse refs/remotes/four/trunk) &&
+	test $(git rev-parse refs/remotes/four/tags/next~2) = \
+	     $(git rev-parse refs/remotes/four/branches/v2/start) &&
 	git log --pretty=oneline refs/remotes/four/tags/next | \
 	    sed -e "s/^.\{41\}//" > output.four &&
 	test_cmp expect.four output.four
-- 
1.7.10.4
Elia Pinto· Mar 25, 2014, 08:25 UTC · re: Elia Pinto · lore

[PATCH 105/144] t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for command substitution

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.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/t9110-git-svn-use-svm-props.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t9110-git-svn-use-svm-props.sh +1 −1
diff --git a/t/t9110-git-svn-use-svm-props.sh b/t/t9110-git-svn-use-svm-props.sh
index a06e4c5..29fbdfd 100755
--- a/t/t9110-git-svn-use-svm-props.sh
+++ b/t/t9110-git-svn-use-svm-props.sh
@@ -51,7 +51,7 @@ test_expect_success 'verify metadata for /dir' "
 
 test_expect_success 'find commit based on SVN revision number' "
         git svn find-rev r12 |
-	    grep `git rev-parse HEAD`
+	    grep $(git rev-parse HEAD)
         "
 
 test_expect_success 'empty rebase' "
-- 
1.7.10.4

← back to recent threads