Merge branch 'ep/shell-command-substitution-style'
authorJunio C Hamano <gitster@pobox.com>
Fri, 22 Jan 2016 21:08:46 +0000 (13:08 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Jan 2016 21:08:46 +0000 (13:08 -0800)
A shell script style update to change `command substitution` into
$(command substitution). Coverts contrib/ and much of the t/
directory contents.

* ep/shell-command-substitution-style: (92 commits)
t9901-git-web--browse.sh: use the $( ... ) construct for command substitution
t9501-gitweb-standalone-http-status.sh: use the $( ... ) construct for command substitution
t9350-fast-export.sh: use the $( ... ) construct for command substitution
t9300-fast-import.sh: use the $( ... ) construct for command substitution
t9150-svk-mergetickets.sh: use the $( ... ) construct for command substitution
t9145-git-svn-master-branch.sh: use the $( ... ) construct for command substitution
t9138-git-svn-authors-prog.sh: use the $( ... ) construct for command substitution
t9137-git-svn-dcommit-clobber-series.sh: use the $( ... ) construct for command substitution
t9132-git-svn-broken-symlink.sh: use the $( ... ) construct for command substitution
t9130-git-svn-authors-file.sh: use the $( ... ) construct for command substitution
t9129-git-svn-i18n-commitencoding.sh: use the $( ... ) construct for command substitution
t9119-git-svn-info.sh: use the $( ... ) construct for command substitution
t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct for command substitution
t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for command substitution
t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for command substitution
t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command substitution
t9108-git-svn-glob.sh: use the $( ... ) construct for command substitution
t9107-git-svn-migrate.sh: use the $( ... ) construct for command substitution
t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command substitution
t9104-git-svn-follow-parent.sh: use the $( ... ) construct for command substitution
...

91 files changed:
contrib/examples/git-commit.sh
contrib/examples/git-fetch.sh
contrib/examples/git-merge.sh
contrib/examples/git-repack.sh
contrib/examples/git-revert.sh
contrib/thunderbird-patch-inline/appp.sh
git-gui/po/glossary/txt-to-pot.sh
t/lib-httpd.sh
t/t1100-commit-tree-options.sh
t/t1401-symbolic-ref.sh
t/t1410-reflog.sh
t/t1511-rev-parse-caret.sh
t/t1512-rev-parse-disambiguation.sh
t/t1700-split-index.sh
t/t2025-worktree-add.sh
t/t2102-update-index-symlinks.sh
t/t3030-merge-recursive.sh
t/t3100-ls-tree-restrict.sh
t/t3101-ls-tree-dirname.sh
t/t3210-pack-refs.sh
t/t3403-rebase-skip.sh
t/t3511-cherry-pick-x.sh
t/t3600-rm.sh
t/t3700-add.sh
t/t5100-mailinfo.sh
t/t5300-pack-object.sh
t/t5301-sliding-window.sh
t/t5302-pack-index.sh
t/t5303-pack-corruption-resilience.sh
t/t5304-prune.sh
t/t5305-include-tag.sh
t/t5500-fetch-pack.sh
t/t5505-remote.sh
t/t5506-remote-groups.sh
t/t5510-fetch.sh
t/t5515-fetch-merge-logic.sh
t/t5516-fetch-push.sh
t/t5517-push-mirror.sh
t/t5522-pull-symlink.sh
t/t5530-upload-pack-error.sh
t/t5532-fetch-proxy.sh
t/t5537-fetch-shallow.sh
t/t5538-push-shallow.sh
t/t5550-http-fetch-dumb.sh
t/t5570-git-daemon.sh
t/t5601-clone.sh
t/t5700-clone-reference.sh
t/t5710-info-alternate.sh
t/t5900-repo-selection.sh
t/t6001-rev-list-graft.sh
t/t6002-rev-list-bisect.sh
t/t6015-rev-list-show-all-parents.sh
t/t6032-merge-large-rename.sh
t/t6132-pathspec-exclude.sh
t/t7001-mv.sh
t/t7003-filter-branch.sh
t/t7004-tag.sh
t/t7006-pager.sh
t/t7103-reset-bare.sh
t/t7406-submodule-update.sh
t/t7408-submodule-reference.sh
t/t7504-commit-msg-hook.sh
t/t7505-prepare-commit-msg-hook.sh
t/t7602-merge-octopus-many.sh
t/t7700-repack.sh
t/t8003-blame-corner-cases.sh
t/t9001-send-email.sh
t/t9100-git-svn-basic.sh
t/t9101-git-svn-props.sh
t/t9104-git-svn-follow-parent.sh
t/t9105-git-svn-commit-diff.sh
t/t9107-git-svn-migrate.sh
t/t9108-git-svn-glob.sh
t/t9109-git-svn-multi-glob.sh
t/t9110-git-svn-use-svm-props.sh
t/t9114-git-svn-dcommit-merge.sh
t/t9118-git-svn-funky-branch-names.sh
t/t9119-git-svn-info.sh
t/t9129-git-svn-i18n-commitencoding.sh
t/t9130-git-svn-authors-file.sh
t/t9132-git-svn-broken-symlink.sh
t/t9137-git-svn-dcommit-clobber-series.sh
t/t9138-git-svn-authors-prog.sh
t/t9145-git-svn-master-branch.sh
t/t9150-svk-mergetickets.sh
t/t9300-fast-import.sh
t/t9350-fast-export.sh
t/t9501-gitweb-standalone-http-status.sh
t/t9901-git-web--browse.sh
test-sha1.sh
unimplemented.sh
index 934505bab9e6cf04a3536010ac31b1795c852c9f..86c9cfa0c7a9a6b3b1f9d956084c65164b7b5e4b 100755 (executable)
@@ -574,10 +574,10 @@ then
        if test "$templatefile" != ""
        then
                # Test whether this is just the unaltered template.
-               if cnt=`sed -e '/^#/d' < "$templatefile" |
+               if cnt=$(sed -e '/^#/d' < "$templatefile" |
                        git stripspace |
                        diff "$GIT_DIR"/COMMIT_BAREMSG - |
-                       wc -l` &&
+                       wc -l) &&
                   test 0 -lt $cnt
                then
                        have_commitmsg=t
@@ -630,8 +630,8 @@ then
        fi
        if test -z "$quiet"
        then
-               commit=`git diff-tree --always --shortstat --pretty="format:%h: %s"\
-                      --abbrev --summary --root HEAD --`
+               commit=$(git diff-tree --always --shortstat --pretty="format:%h: %s"\
+                      --abbrev --summary --root HEAD --)
                echo "Created${initial_commit:+ initial} commit $commit"
        fi
 fi
index 554070909cca4d229325a6ca6f401af8bc603cb2..57d2e5616f4702bc94e88b7d61dc886341f7b2cd 100755 (executable)
@@ -146,13 +146,13 @@ esac
 reflist=$(get_remote_refs_for_fetch "$@")
 if test "$tags"
 then
-       taglist=`IFS='  ' &&
+       taglist=$(IFS=' ' &&
                  echo "$ls_remote_result" |
                  git show-ref --exclude-existing=refs/tags/ |
                  while read sha1 name
                  do
                        echo ".${name}:${name}"
-                 done` || exit
+                 done) || exit
        if test "$#" -gt 1
        then
                # remote URL plus explicit refspecs; we need to merge them.
index 52f2aafb9d720723c1dc08e870f38ef495198fa3..ee99f1a4ee89a9e9f358b6cc89fc84cab554b439 100755 (executable)
@@ -523,10 +523,10 @@ do
 
        if test "$exit" -eq 1
        then
-           cnt=`{
+           cnt=$({
                git diff-files --name-only
                git ls-files --unmerged
-           } | wc -l`
+           } | wc -l)
            if test $best_cnt -le 0 || test $cnt -le $best_cnt
            then
                best_strategy=$strategy
index 96e3fed326abeb293e9ef398989bce1054cbf855..672af934431eafcdc84a10230750472ca902ff73 100755 (executable)
@@ -67,8 +67,8 @@ case ",$all_into_one," in
 ,t,)
        args= existing=
        if [ -d "$PACKDIR" ]; then
-               for e in `cd "$PACKDIR" && find . -type f -name '*.pack' \
-                       | sed -e 's/^\.\///' -e 's/\.pack$//'`
+               for e in $(cd "$PACKDIR" && find . -type f -name '*.pack' \
+                       | sed -e 's/^\.\///' -e 's/\.pack$//')
                do
                        if [ -e "$PACKDIR/$e.keep" ]; then
                                : keep
index 7e2aad549103c0c2cdaa452a60a16706f0c7e117..197838d10bfb4881bbecac30a025f1ba7dc44446 100755 (executable)
@@ -138,8 +138,8 @@ cherry-pick)
        }'
 
        logmsg=$(git show -s --pretty=raw --encoding="$encoding" "$commit")
-       set_author_env=`echo "$logmsg" |
-       LANG=C LC_ALL=C sed -ne "$pick_author_script"`
+       set_author_env=$(echo "$logmsg" |
+       LANG=C LC_ALL=C sed -ne "$pick_author_script")
        eval "$set_author_env"
        export GIT_AUTHOR_NAME
        export GIT_AUTHOR_EMAIL
@@ -160,9 +160,9 @@ cherry-pick)
 esac >.msg
 
 eval GITHEAD_$head=HEAD
-eval GITHEAD_$next='`git show -s \
+eval GITHEAD_$next='$(git show -s \
        --pretty=oneline --encoding="$encoding" "$commit" |
-       sed -e "s/^[^ ]* //"`'
+       sed -e "s/^[^ ]* //")'
 export GITHEAD_$head GITHEAD_$next
 
 # This three way merge is an interesting one.  We are at
index 8dc73ece15a075bb60971da577d2da272c8f7c14..1053872eea903cc07d10cd18a3d45874f6eaf7bf 100755 (executable)
@@ -31,8 +31,8 @@ BODY=$(sed -e "1,/${SEP}/d" $1)
 CMT_MSG=$(sed -e '1,/^$/d' -e '/^---$/,$d' "${PATCH}")
 DIFF=$(sed -e '1,/^---$/d' "${PATCH}")
 
-CCS=`echo -e "$CMT_MSG\n$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
-       -e 's/^Signed-off-by: \(.*\)/\1,/gp'`
+CCS=$(echo -e "$CMT_MSG\n$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
+       -e 's/^Signed-off-by: \(.*\)/\1,/gp')
 
 echo "$SUBJECT" > $1
 echo "Cc: $CCS" >> $1
index 49bf7c5365130ec290948ee8abba28d757774381..8249915d3c6c974df906a2c99c1d172d50bab502 100755 (executable)
@@ -11,7 +11,7 @@
 if [ $# -eq 0 ]
 then
        cat <<!
-Usage: `basename $0` git-gui-glossary.txt > git-gui-glossary.pot
+Usage: $(basename $0) git-gui-glossary.txt > git-gui-glossary.pot
 !
        exit 1;
 fi
@@ -33,7 +33,7 @@ cat <<!
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: `date +'%Y-%m-%d %H:%M%z'`\n"
+"POT-Creation-Date: $(date +'%Y-%m-%d %H:%M%z')\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index e9714467d05e57eded6f37c3d5f07b91f63cc9fc..f9f3e5fd82e1b34d87993f750bd05e46e69bd82c 100644 (file)
@@ -98,8 +98,8 @@ then
        test_skip_or_die $GIT_TEST_HTTPD "no web server found at '$LIB_HTTPD_PATH'"
 fi
 
-HTTPD_VERSION=`$LIB_HTTPD_PATH -v | \
-       sed -n 's/^Server version: Apache\/\([0-9]*\)\..*$/\1/p; q'`
+HTTPD_VERSION=$($LIB_HTTPD_PATH -v | \
+       sed -n 's/^Server version: Apache\/\([0-9]*\)\..*$/\1/p; q')
 
 if test -n "$HTTPD_VERSION"
 then
index f8457f9d14c90349b0d3b09a3f695cbfafc3cbbf..b7e9b4fc5b365897d80501d1c49d70ad47740acc 100755 (executable)
@@ -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' \
index 1f0dff3a0b1cedb95b900a01de972e8a02e29f90..ce8b4f4d0f375fb49afdb80d002559464a5b2812 100755 (executable)
@@ -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
 
index 17a194bfa6e80871f6cb002e1ee3bcd0c832be84..c623824b4d0c2bfde08a69c242e4c5340b97abd3 100755 (executable)
@@ -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 &&
index 15973f20945769fd7661cd4b203e96032495a60e..7043ba7947933644f15d086d8bdd95d377c4d265 100755 (executable)
@@ -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 &&
index 4a155c8d095fb8ca2c2f88802d3501e01d07ce28..e221167cfbe3fb34cf5aba88cd04f6a1dc9eede5 100755 (executable)
@@ -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
 '
 
index 193d55c3f4486ce3515b261df0c7edf9b3e3fcbb..8aef49f23624305a62047da4bc2fd66e6a03b0e5 100755 (executable)
@@ -55,7 +55,7 @@ test_expect_success 'disable split index' '
 EOF
        test_cmp ls-files.expect ls-files.actual &&
 
-       BASE=`test-dump-split-index .git/index | grep "^own" | sed "s/own/base/"` &&
+       BASE=$(test-dump-split-index .git/index | grep "^own" | sed "s/own/base/") &&
        test-dump-split-index .git/index | sed "/^own/d" >actual &&
        cat >expect <<EOF &&
 not a split index
index 369417498946fcebb901d8593bb584f3767b1e67..0a804dab634d0a72bfabd8826d0cb38e1b4f7dbc 100755 (executable)
@@ -123,10 +123,10 @@ test_expect_success 'checkout from a bare repo without "add"' '
 test_expect_success 'checkout with grafts' '
        test_when_finished rm .git/info/grafts &&
        test_commit abc &&
-       SHA1=`git rev-parse HEAD` &&
+       SHA1=$(git rev-parse HEAD) &&
        test_commit def &&
        test_commit xyz &&
-       echo "`git rev-parse HEAD` $SHA1" >.git/info/grafts &&
+       echo "$(git rev-parse HEAD) $SHA1" >.git/info/grafts &&
        cat >expected <<-\EOF &&
        xyz
        abc
index 4d0d0a35156ee1a7604f0ea719e93d3f765a2f91..22f2c730ae8dbf995605e9134eeb2a5bc84065db 100755 (executable)
@@ -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'
index 6224187632b105edf1940023eba4a49523d92fe2..f7b0e599f1124c332a106a3b8df6f304382c2fa4 100755 (executable)
@@ -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' '
index eb73c06a4e1ee826684ee84efa134ee5517023a6..325114f8fee810ac9cf1836f50e060f69b5fe46e 100755 (executable)
@@ -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 () {
index 026f9f89d916fdd0547c58aed7bcba7f06850023..425d858938f51bdb8745b28e92c74246e618ef07 100755 (executable)
@@ -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
 '
 
index db244d2f8820cf63fd77e91460631009b20e4029..9b182a0c328e9bc6eb1e24a0cbaec47d9fa36b24 100755 (executable)
@@ -27,7 +27,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'
index 3968020e648091e907fde6efe9aeb5ce66753670..1f5122b632fb9d7829e7b5f28c2a2971e9ea04e7 100755 (executable)
@@ -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' '
index b7dff09d0656930332f347bd3106d1473015abd0..9cce5ae8815a11e3453f5669b0592f7f7659009b 100755 (executable)
@@ -77,7 +77,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
@@ -114,7 +114,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
@@ -139,7 +139,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
@@ -164,7 +164,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
@@ -187,7 +187,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
@@ -200,7 +200,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
@@ -223,7 +223,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
index 9d90d2c935bcd3d4dc745287a9068395cb2b3d93..2e47a2bfd8c99988d536483a0c01d8b81396c5b5 100755 (executable)
@@ -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"
 '
index f7ff1f555d473ec1e7bd0f32d8d3c29426adc9f0..f14a6653565cede5ad9d43e47e71eaf98f58839f 100755 (executable)
@@ -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'
@@ -173,14 +173,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' '
index e97cfb2ab838fc9d9ecf1a7d207d6316e11a63f5..85b3df5e339b668688873c27244c458443bb6e6a 100755 (executable)
@@ -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 00*
 do
        test_expect_success "mailinfo $mail" '
                check_mailinfo $mail "" &&
@@ -47,11 +47,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 rfc2047/00*
 do
        test_expect_success "mailinfo $mail" '
                git mailinfo -u $mail-msg $mail-patch <$mail >$mail-info &&
index 20c1961515a02e3411d02a5656bf8a9dc6b198de..fc2be63e02d85682cd24457ee646c8c626ca967a 100755 (executable)
@@ -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
index 2fc5af6007c75b7789cf2a91163939e24e00ac09..cae8c2e8822ccc1e464e3f5b71c99c1f6b1c2323 100755 (executable)
@@ -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"'
 
index 3dc5ec4dd331c152754f3c9480042103d5d9f290..c2fc584dac3d7e96748866dd0a4ae31f7cae3fc2 100755 (executable)
@@ -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 ) &&
index 663b02bbb13cf6bee3d59ea350d5f42add687d7b..5940ce2084a6e9cc935a0e5784ff8b6bff8e035d 100755 (executable)
@@ -32,23 +32,23 @@ 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` &&
-    pack=`printf "$blob_1\n$blob_2\n$blob_3\n" |
-          git pack-objects $@ .git/objects/pack/pack` &&
+    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}" &&
     git verify-pack -v ${pack}.pack
 }
 
 do_repack() {
-    pack=`printf "$blob_1\n$blob_2\n$blob_3\n" |
-          git pack-objects $@ .git/objects/pack/pack` &&
+    pack=$(printf "$blob_1\n$blob_2\n$blob_3\n" |
+          git pack-objects $@ .git/objects/pack/pack) &&
     pack=".git/objects/pack/pack-${pack}"
 }
 
 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 &&
index def203c7243c099e1359b9a0c44f22a07c06cb37..133b5842b1aee8e8e00eb0ca7e1b2d32ff4a4c9a 100755 (executable)
@@ -266,7 +266,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 &&
index 21517c70cd49ab91ab267544311d8c33173e3c3e..f314ad50791142b42c5f2807b5f086bbe9e1caad 100755 (executable)
@@ -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 &&
index 3a9b77576fb57828cd574017883c7920c2d91aa3..e5f83bf5e412bc3304009408a58663d7b94dac02 100755 (executable)
@@ -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 &&
@@ -50,18 +50,18 @@ pull_to_client () {
                        case "$heads" in *B*)
                            echo $BTIP > .git/refs/heads/B;;
                        esac &&
-                       git symbolic-ref HEAD refs/heads/`echo $heads \
-                               | sed -e "s/^\(.\).*$/\1/"` &&
+                       git symbolic-ref HEAD refs/heads/$(echo $heads \
+                               | sed -e "s/^\(.\).*$/\1/") &&
 
                        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' '
index dfaf9d9f68939f0c39a512c478265b4aa227c973..1a8e3b81c815cfb92b7025a12d8c703f2ffc54e9 100755 (executable)
@@ -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
index 530b01678e5c9cfc1aed2fe2c6fcd96b9a09a90d..83d5558c0ef0496e16e7c9f7a69cddc99cd11d86 100755 (executable)
@@ -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
index 0ba9db08847255d28e3e185d18b68703fb0755dc..47e68a597cfb5a99a236915845eb8627e47204a5 100755 (executable)
@@ -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"
index dbb927dec8ea9f40e8e106f416c276f1b6a07868..36b0dbc01cffc06aefb180179965ccbaa9c983d8 100755 (executable)
@@ -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"
index 0a87e195eac3a70ecca9e9a5750655774a686b1d..26b2cafc4795baa8b9377c767e4453079826c34f 100755 (executable)
@@ -16,7 +16,7 @@ This test checks the following functionality:
 
 . ./test-lib.sh
 
-D=`pwd`
+D=$(pwd)
 
 mk_empty () {
        repo_name="$1"
@@ -422,7 +422,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
 
 '
 
index 12a5dfb17e0a0bd4d0d9636ff13bf44999f78e36..02f160aae0c414411572a99a148d2b039c24fdd3 100755 (executable)
@@ -4,7 +4,7 @@ test_description='pushing to a mirror repository'
 
 . ./test-lib.sh
 
-D=`pwd`
+D=$(pwd)
 
 invert () {
        if "$@"; then
index 8e9b204e02a3d204af08463d2229ca0f319cdc42..bcff460d0a2ba2b6b9965e7bff58bc26033231ab 100755 (executable)
@@ -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().
 #
index 3932e797f7f60545e6e8c140824a5ca5ee16832a..4f6e32b04c48b7723a2b9dc172cd2104c3349e0b 100755 (executable)
@@ -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") &&
index 5531bd1af42dac808d64d75a6fc3e848ef968a34..d75ef0ea2b6eb5596ee97b92529d9800411f543c 100755 (executable)
@@ -15,7 +15,7 @@ test_expect_success 'setup remote repo' '
 cat >proxy <<'EOF'
 #!/bin/sh
 echo >&2 "proxying for $*"
-cmd=`"$PERL_PATH" -e '
+cmd=$("$PERL_PATH" -e '
        read(STDIN, $buf, 4);
        my $n = hex($buf) - 4;
        read(STDIN, $buf, $n);
@@ -23,7 +23,7 @@ cmd=`"$PERL_PATH" -e '
        # drop absolute-path on repo name
        $cmd =~ s{ /}{ };
        print $cmd;
-'`
+')
 echo >&2 "Running '$cmd'"
 exec $cmd
 EOF
index a980574682012fbb3f5f7c28a011df980f45c3de..df8d2f095a40f524b8318b98a7c4fb085d8010f4 100755 (executable)
@@ -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
 
 '
 
index ceee95b8a48455e15769168fe67af17deec7e179..ecbf84d21c807a8d211c2068bd0a5d10deae4758 100755 (executable)
@@ -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
        )
 '
 test_done
index 87a7aa04aeb452c162dc5585efd0ec13195ea80a..64146352ae20e9a5abdcda77be514d0f3264c3b8 100755 (executable)
@@ -132,7 +132,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
        ) &&
@@ -140,14 +140,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
        ) &&
@@ -155,7 +155,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)
        )
 '
 
index b7e283252d7d73e937ef87096801f2d252e95961..d76269a8fc96a874042cd2e070794e2c56577468 100755 (executable)
@@ -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)
        )
 '
 
index 31b46582d79889c4d85879e7dedfc2c618b274d1..669ec9ba811fedeca820c4454b490e975b03bfca 100755 (executable)
@@ -244,7 +244,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
 '
 
index dfa1bf79c5690289baeddd4498cb4c84dbd19bbe..4320082b1b8fe709e9462f84d15fec63c54a94d4 100755 (executable)
@@ -6,7 +6,7 @@
 test_description='test clone --reference'
 . ./test-lib.sh
 
-base_dir=`pwd`
+base_dir=$(pwd)
 
 U=$base_dir/UPLOAD_LOG
 
index 5a6e49d18d6f9e6e06409093d9b9f426d70de475..9cd2626dba885b6ebf34ae8efccecf005c95f438 100755 (executable)
@@ -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 &&
index 3d5b418bb48ae9fa50411d1c88bc19b3404f1da1..14e59c5b3e4239c3d41d01f3c6a0d821dfe4e260 100755 (executable)
@@ -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
        )
index 8efcd130795890c36dfe6c5c630d2be44c6e1699..05ddc69cf2ad9470a125fda47fc450401f94902b 100755 (executable)
@@ -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
 '
 
index 43ad7724845cd0e1523aadd60845f048a6b92ce5..3bf2759eaebd38bca5d37f624144436fc77828eb 100755 (executable)
@@ -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" \
index 8b146fb432bc7a8dee8eeeb43f2b6b946d51190b..3c73c93ba6eb17db6ea91de7122b8bb7a839e795 100755 (executable)
@@ -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' '
index 0f792689174efda55f041b1c6b2aa14f95860772..80777386dc6961b5114a85ea6efd14e066ebc9a4 100755 (executable)
@@ -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
index e1e1b1fa382fa3ea129450770d575bffdddc47b9..d51595cf6b189a59d271dcc69c3f245b72dcb8f6 100755 (executable)
@@ -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 &&
index 7b56081137396680df58c887ffe7919d98f6480c..51dd2b4e0e088c11bf359b32eddf353e58ca6d4d 100755 (executable)
@@ -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 | verbose grep partA/outline.txt
 '
 
index 869e0bf0735033f66c5cba44d107f799fc07b112..8868e6e090e0528f41e11473e7efee3ca54bd6b3 100755 (executable)
@@ -387,7 +387,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 && {
@@ -396,7 +396,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' '
@@ -405,7 +405,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_expect_success 'filter commit message without trailing newline' '
index 3dd2f51e49d7e6824382ac415cf64842fa3b757f..2797f225308fa28965bc06017a4c0b772ab97025 100755 (executable)
@@ -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' \
@@ -72,8 +72,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:
@@ -83,7 +83,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 \
@@ -92,7 +92,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:
 
@@ -102,13 +102,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' '
index 6ea7ac4c418d7ace719910c1730217a1ffe7532f..e4fc5c826c2c02d540c64ac88374f8ad85869023 100755 (executable)
@@ -424,7 +424,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
 '
 
index 1eef93c2b292c8ec649f12c826587365e5a0d0e6..afe36a533c4bc603d5acced8de1d607a4a7d5fc8 100755 (executable)
@@ -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
index dda3929d99aea3ea30d30b5715532fe6184d5259..68ea31d6936cd1b19efc812cd11f63b7a6ca4fbb 100755 (executable)
@@ -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"
 }
index b770b2f04d56336f92b9394b4a2ce22a241480c4..eaea19b8f291ef6b9f13a05342dc10317f3bfbe9 100755 (executable)
@@ -6,7 +6,7 @@
 test_description='test clone --reference'
 . ./test-lib.sh
 
-base_dir=`pwd`
+base_dir=$(pwd)
 
 U=$base_dir/UPLOAD_LOG
 
index 1f53ea8090355c9a351da1983388e1a49fd88ae3..8728db61d38905d9e3e699cb9f450716e4236017 100755 (executable)
@@ -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' '
index 03dce09cfea5f1b5c19e7e8c4537a657cdf55dfc..b13f72975ecce17887c4c8275c6935d78d4b09a0 100755 (executable)
@@ -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,27 +108,27 @@ 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"
 
 '
 
@@ -141,7 +141,7 @@ test_expect_success 'with hook (merge)' '
        git commit -m other &&
        git checkout - &&
        git merge --no-ff other &&
-       test "`git log -1 --pretty=format:%s`" = "merge (no editor)"
+       test "$(git log -1 --pretty=format:%s)" = "merge (no editor)"
 '
 
 test_expect_success 'with hook and editor (merge)' '
@@ -153,7 +153,7 @@ test_expect_success 'with hook and editor (merge)' '
        git commit -m other &&
        git checkout - &&
        env GIT_EDITOR="\"\$FAKE_EDITOR\"" git merge --no-ff -e other &&
-       test "`git log -1 --pretty=format:%s`" = "merge"
+       test "$(git log -1 --pretty=format:%s)" = "merge"
 '
 
 cat > "$HOOK" <<'EOF'
@@ -164,7 +164,7 @@ EOF
 test_expect_success 'with failing hook' '
 
        test_when_finished "git checkout -f master" &&
-       head=`git rev-parse HEAD` &&
+       head=$(git rev-parse HEAD) &&
        echo "more" >> file &&
        git add file &&
        test_must_fail env GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -c $head
@@ -174,7 +174,7 @@ test_expect_success 'with failing hook' '
 test_expect_success 'with failing hook (--no-verify)' '
 
        test_when_finished "git checkout -f master" &&
-       head=`git rev-parse HEAD` &&
+       head=$(git rev-parse HEAD) &&
        echo "more" >> file &&
        git add file &&
        test_must_fail env GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit --no-verify -c $head
index 955f09f8e818cea8d32e453cd4971ff362d69bea..6abe441ae3611906143a76ac2b4acca7ab5ff671 100755 (executable)
@@ -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
 '
 
index 021c5479bdf4665e815590dc05a0831e7d92c53c..6061a04147a06dba0d049cbb5d31f8049c2210d0 100755 (executable)
@@ -69,7 +69,7 @@ test_expect_success 'writing bitmaps via config 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 &&
@@ -168,7 +168,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/ &&
index 16f1442c1e6e4780dc10474a3fbf516841468c9f..6568429753d5f90426ad6acc0703b79e9f7a3284 100755 (executable)
@@ -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
 '
 
index 834d91a691556530cd85cc34b2e3f0330764d253..b3355d2c7016e55e99a465414f230569c3807230 100755 (executable)
@@ -36,7 +36,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
@@ -1151,7 +1151,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 \
@@ -1162,7 +1162,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 \
@@ -1175,8 +1175,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 \
@@ -1488,7 +1488,7 @@ test_cover_addresses () {
        clean_fake_sendmail &&
        rm -fr outdir &&
        git format-patch --cover-letter -2 -o outdir &&
-       cover=`echo outdir/0000-*.patch` &&
+       cover=$(echo outdir/0000-*.patch) &&
        mv $cover cover-to-edit.patch &&
        perl -pe "s/^From:/$header: extra\@address.com\nFrom:/" cover-to-edit.patch >"$cover" &&
        git send-email \
index 4fea8d901bbc0f713a1500adbbdd2e5886720f47..258d9b8cefb6bbf81a64098d57db03f7c1da90c6 100755 (executable)
@@ -265,18 +265,18 @@ test_expect_success 'able to dcommit to a subdirectory' "
        git update-index --add d &&
        git commit -m '/bar/d should be in the log' &&
        git svn dcommit -i bar &&
-       test -z \"\`git diff refs/heads/my-bar refs/remotes/bar\`\" &&
+       test -z \"\$(git diff refs/heads/my-bar refs/remotes/bar)\" &&
        mkdir newdir &&
        echo new > newdir/dir &&
        git update-index --add newdir/dir &&
        git commit -m 'add a new directory' &&
        git svn dcommit -i bar &&
-       test -z \"\`git diff refs/heads/my-bar refs/remotes/bar\`\" &&
+       test -z \"\$(git diff refs/heads/my-bar refs/remotes/bar)\" &&
        echo foo >> newdir/dir &&
        git update-index newdir/dir &&
        git commit -m 'modify a file in new directory' &&
        git svn dcommit -i bar &&
-       test -z \"\`git diff refs/heads/my-bar refs/remotes/bar\`\"
+       test -z \"\$(git diff refs/heads/my-bar refs/remotes/bar)\"
        "
 
 test_expect_success 'dcommit should not fail with a touched file' '
@@ -295,7 +295,7 @@ test_expect_success 'able to set-tree to a subdirectory' "
        git update-index d &&
        git commit -m 'update /bar/d' &&
        git svn set-tree -i bar HEAD &&
-       test -z \"\`git diff refs/heads/my-bar refs/remotes/bar\`\"
+       test -z \"\$(git diff refs/heads/my-bar refs/remotes/bar)\"
        "
 
 test_expect_success 'git-svn works in a bare repository' '
index 8869f5018ecd06636dc3e722cb518af88a6919d9..e8173d5fefa205fe74aae88a1e32247a71340bfb 100755 (executable)
@@ -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'"
index 83f17e13e805300f03016e8fc66c717db2657f3c..cd480edf1606fda8d973ee3decb8e18e03356153 100755 (executable)
@@ -31,12 +31,12 @@ 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 cat-file blob refs/remotes/thunk:readme |\
-                 sed -n -e "3p"`" = goodbye &&
-       test -z "`git config --get svn-remote.svn.fetch \
-                "^trunk:refs/remotes/thunk@2$"`"
+       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 \
+                "^trunk:refs/remotes/thunk@2$")"
        '
 
 test_expect_success 'init and fetch from one svn-remote' '
@@ -46,10 +46,10 @@ 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 cat-file blob refs/remotes/svn/thunk:readme |\
-                 sed -n -e "3p"`" = goodbye
+       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
         '
 
 test_expect_success 'follow deleted parent' '
@@ -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,10 +80,10 @@ test_expect_success 'follow larger parent' '
         git rev-parse --verify refs/remotes/larger &&
         git rev-parse --verify \
           refs/remotes/larger-parent &&
-        test "`git merge-base \
+       test "$(git merge-base \
                 refs/remotes/larger-parent \
-                 refs/remotes/larger`" = \
-             "`git rev-parse refs/remotes/larger`"
+                refs/remotes/larger)" = \
+            "$(git rev-parse refs/remotes/larger)"
         '
 
 test_expect_success 'follow higher-level parent' '
@@ -106,8 +106,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)
@@ -142,9 +142,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" '
@@ -152,11 +152,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" '
@@ -193,19 +193,19 @@ 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" '
        svn_cmd cp -m "resurrect /glob" "$svnrepo"/r9270 "$svnrepo"/glob &&
        git svn multi-fetch &&
-       test `git cat-file commit refs/remotes/glob | \
-              grep "^parent " | wc -l` -eq 2
+       test $(git cat-file commit refs/remotes/glob | \
+              grep "^parent " | wc -l) -eq 2
        '
 
 test_expect_success "multi-fetch continues to work" "
index 5d0afeae6caf03ca34d7ef883baed512bcbcec51..6ed5f74e259ded8d7d336deaf22474aa504e060b 100755 (executable)
@@ -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
index 6e69fc4c65aeb77b1a4d784c7842762090ae6787..906019803797b01a4b447858d7766486bba951aa 100755 (executable)
@@ -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}"
        '
 
@@ -46,10 +46,10 @@ test_expect_success 'initialize a multi-repository repo' '
        git svn init "$svnrepo" -T trunk -t tags -b branches &&
        git config --get-all svn-remote.svn.fetch > fetch.out &&
        grep "^trunk:refs/remotes/origin/trunk$" fetch.out &&
-       test -n "`git config --get svn-remote.svn.branches \
-                   "^branches/\*:refs/remotes/origin/\*$"`" &&
-       test -n "`git config --get svn-remote.svn.tags \
-                   "^tags/\*:refs/remotes/origin/tags/\*$"`" &&
+       test -n "$(git config --get svn-remote.svn.branches \
+                   "^branches/\*:refs/remotes/origin/\*$")" &&
+       test -n "$(git config --get svn-remote.svn.tags \
+                   "^tags/\*:refs/remotes/origin/tags/\*$")" &&
        git config --unset svn-remote.svn.branches \
                                "^branches/\*:refs/remotes/origin/\*$" &&
        git config --unset svn-remote.svn.tags \
@@ -75,28 +75,28 @@ 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/origin/\$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
-           test -z \"\`git diff refs/remotes/origin/\$i \
-                                refs/remotes/origin/\$j\`\" ||exit 1; done; done
+           test -z \"\$(git diff refs/remotes/origin/\$i \
+                                refs/remotes/origin/\$j)\" ||exit 1; done; done
        "
 
 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/origin/trunk$" fetch.out &&
        grep "^branches/a:refs/remotes/origin/a$" fetch.out &&
index d732d3130299e964359784949fc97805a2888e39..a526d603793957f781002c98b2da60e1005bf39f 100755 (executable)
@@ -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
index c318f9f946a35f0d13b90f67dd00a6817d77d989..f36b74924236ff54bc6400ff8afacdf95def363d 100755 (executable)
@@ -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
index a06e4c5b8e3fa5d5c0c14afede47c630ccb07712..29fbdfdd3f02c2dfb6219e749dadd8a495a6c97d 100755 (executable)
@@ -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' "
index fb41876677a9025f2d267ade0c8898e63022a704..a3d388228a19cec73c7c9521905b82cd36d07752 100755 (executable)
@@ -68,8 +68,8 @@ test_expect_success 'setup git mirror and merge' '
 test_debug 'gitk --all & sleep 1'
 
 test_expect_success 'verify pre-merge ancestry' "
-       test x\`git rev-parse --verify refs/heads/svn^2\` = \
-            x\`git rev-parse --verify refs/heads/merge\` &&
+       test x\$(git rev-parse --verify refs/heads/svn^2) = \
+            x\$(git rev-parse --verify refs/heads/merge) &&
        git cat-file commit refs/heads/svn^ | grep '^friend$'
        "
 
@@ -80,10 +80,10 @@ test_expect_success 'git svn dcommit merges' "
 test_debug 'gitk --all & sleep 1'
 
 test_expect_success 'verify post-merge ancestry' "
-       test x\`git rev-parse --verify refs/heads/svn\` = \
-            x\`git rev-parse --verify refs/remotes/origin/trunk \` &&
-       test x\`git rev-parse --verify refs/heads/svn^2\` = \
-            x\`git rev-parse --verify refs/heads/merge\` &&
+       test x\$(git rev-parse --verify refs/heads/svn) = \
+            x\$(git rev-parse --verify refs/remotes/origin/trunk) &&
+       test x\$(git rev-parse --verify refs/heads/svn^2) = \
+            x\$(git rev-parse --verify refs/heads/merge) &&
        git cat-file commit refs/heads/svn^ | grep '^friend$'
        "
 
index ed4d1369cca6a232cdb7ed98fc75b074a808e46e..a2219154b89393effa51f87b3be56706728b6572 100755 (executable)
@@ -35,7 +35,7 @@ test_expect_success 'setup svnrepo' '
 # SVN 1.7 will truncate "not-a%40{0]" to just "not-a".
 # Look at what SVN wound up naming the branch and use that.
 # Be sure to escape the @ if it shows up.
-non_reflog=`svn_cmd ls "$svnrepo/pr ject/branches" | grep not-a | sed 's/\///' | sed 's/@/%40/'`
+non_reflog=$(svn_cmd ls "$svnrepo/pr ject/branches" | grep not-a | sed 's/\///' | sed 's/@/%40/')
 
 test_expect_success 'test clone with funky branch names' '
        git svn clone -s "$svnrepo/pr ject" project &&
index f16f3234a1acb9953ba33578b6cb689e2583ea80..88241baee32478c7ead525dece88f1e7c6edfa06 100755 (executable)
@@ -8,7 +8,7 @@ test_description='git svn info'
 
 # Tested with: svn, version 1.4.4 (r25188)
 # Tested with: svn, version 1.6.[12345689]
-v=`svn_cmd --version | sed -n -e 's/^svn, version \(1\.[0-9]*\.[0-9]*\).*$/\1/p'`
+v=$(svn_cmd --version | sed -n -e 's/^svn, version \(1\.[0-9]*\.[0-9]*\).*$/\1/p')
 case $v in
 1.[456].*)
        ;;
index 8cfdfe790f1e0bb7cd0ddb72a72a55073368ec60..39b6bcb398fff970184e242bdd51500b84f7d382 100755 (executable)
@@ -7,7 +7,7 @@ test_description='git svn honors i18n.commitEncoding in config'
 . ./lib-git-svn.sh
 
 compare_git_head_with () {
-       nr=`wc -l < "$1"`
+       nr=$(wc -l < "$1")
        a=7
        b=$(($a + $nr - 1))
        git cat-file commit HEAD | sed -ne "$a,${b}p" >current &&
@@ -29,7 +29,7 @@ fi
 compare_svn_head_with () {
        # extract just the log message and strip out committer info.
        # don't use --limit here since svn 1.1.x doesn't have it,
-       LC_ALL="$a_utf8_locale" svn log `git svn info --url` | perl -w -e '
+       LC_ALL="$a_utf8_locale" svn log $(git svn info --url) | perl -w -e '
                use bytes;
                $/ = ("-"x72) . "\n";
                my @x = <STDIN>;
index c44de267a1c0e2546eb06c3607d2daef41a6a330..d306b77c31e6a73cc777b71eba1f69090093c0dc 100755 (executable)
@@ -26,7 +26,7 @@ test_expect_success 'start import with incomplete authors file' '
 test_expect_success 'imported 2 revisions successfully' '
        (
                cd x
-               test "`git rev-list refs/remotes/git-svn | wc -l`" -eq 2 &&
+               test "$(git rev-list refs/remotes/git-svn | wc -l)" -eq 2 &&
                git rev-list -1 --pretty=raw refs/remotes/git-svn | \
                  grep "^author BBBBBBB BBBBBBB <bb@example\.com> " &&
                git rev-list -1 --pretty=raw refs/remotes/git-svn~1 | \
@@ -43,7 +43,7 @@ test_expect_success 'continues to import once authors have been added' '
        (
                cd x
                git svn fetch --authors-file=../svn-authors &&
-               test "`git rev-list refs/remotes/git-svn | wc -l`" -eq 4 &&
+               test "$(git rev-list refs/remotes/git-svn | wc -l)" -eq 4 &&
                git rev-list -1 --pretty=raw refs/remotes/git-svn | \
                  grep "^author DDDDDDD DDDDDDD <dd@example\.com> " &&
                git rev-list -1 --pretty=raw refs/remotes/git-svn~1 | \
@@ -73,8 +73,8 @@ tmp_config_get () {
 test_expect_success 'failure happened without negative side effects' '
        (
                cd aa-work &&
-               test 6 -eq "`tmp_config_get svn-remote.svn.branches-maxRev`" &&
-               test 6 -eq "`tmp_config_get svn-remote.svn.tags-maxRev`"
+               test 6 -eq "$(tmp_config_get svn-remote.svn.branches-maxRev)" &&
+               test 6 -eq "$(tmp_config_get svn-remote.svn.tags-maxRev)"
        )
        '
 
@@ -86,8 +86,8 @@ test_expect_success 'fetch continues after authors-file is fixed' '
        (
                cd aa-work &&
                git svn fetch --authors-file=../svn-authors &&
-               test 8 -eq "`tmp_config_get svn-remote.svn.branches-maxRev`" &&
-               test 8 -eq "`tmp_config_get svn-remote.svn.tags-maxRev`"
+               test 8 -eq "$(tmp_config_get svn-remote.svn.branches-maxRev)" &&
+               test 8 -eq "$(tmp_config_get svn-remote.svn.tags-maxRev)"
        )
        '
 
index 6c4c90b03694d2ebe986897b744444fbc00b7125..aeceffaf7b0824b8da673261f523589d3b141619 100755 (executable)
@@ -87,7 +87,7 @@ test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" x'
 
 test_expect_success SYMLINKS '"bar" is a symlink that points to "asdf"' '
        test -L x/bar &&
-       (cd x && test xasdf = x"`git cat-file blob HEAD:bar`")
+       (cd x && test xasdf = x"$(git cat-file blob HEAD:bar)")
 '
 
 test_expect_success 'get "bar" => symlink fix from svn' '
@@ -96,7 +96,7 @@ test_expect_success 'get "bar" => symlink fix from svn' '
 
 test_expect_success SYMLINKS '"bar" remains a proper symlink' '
        test -L x/bar &&
-       (cd x && test xdoink = x"`git cat-file blob HEAD:bar`")
+       (cd x && test xdoink = x"$(git cat-file blob HEAD:bar)")
 '
 
 test_done
index d60da63f7aced3e13a411eee661509ae3790e68f..5fa07a369ff06f739a9edea2a8924fc3f19a88ca 100755 (executable)
@@ -16,15 +16,15 @@ test_expect_success 'initialize repo' '
        '
 
 test_expect_success '(supposedly) non-conflicting change from SVN' '
-       test x"`sed -n -e 58p < file`" = x58 &&
-       test x"`sed -n -e 61p < file`" = x61 &&
+       test x"$(sed -n -e 58p < file)" = x58 &&
+       test x"$(sed -n -e 61p < file)" = x61 &&
        svn_cmd co "$svnrepo" tmp &&
        (cd tmp &&
                perl -i.bak -p -e "s/^58$/5588/" file &&
                perl -i.bak -p -e "s/^61$/6611/" file &&
                poke file &&
-               test x"`sed -n -e 58p < file`" = x5588 &&
-               test x"`sed -n -e 61p < file`" = x6611 &&
+               test x"$(sed -n -e 58p < file)" = x5588 &&
+               test x"$(sed -n -e 61p < file)" = x6611 &&
                svn_cmd commit -m "58 => 5588, 61 => 6611"
        )
        '
@@ -38,20 +38,20 @@ test_expect_success 'some unrelated changes to git' "
        "
 
 test_expect_success 'change file but in unrelated area' "
-       test x\"\`sed -n -e 4p < file\`\" = x4 &&
-       test x\"\`sed -n -e 7p < file\`\" = x7 &&
+       test x\"\$(sed -n -e 4p < file)\" = x4 &&
+       test x\"\$(sed -n -e 7p < file)\" = x7 &&
        perl -i.bak -p -e 's/^4\$/4444/' file &&
        perl -i.bak -p -e 's/^7\$/7777/' file &&
-       test x\"\`sed -n -e 4p < file\`\" = x4444 &&
-       test x\"\`sed -n -e 7p < file\`\" = x7777 &&
+       test x\"\$(sed -n -e 4p < file)\" = x4444 &&
+       test x\"\$(sed -n -e 7p < file)\" = x7777 &&
        git commit -m '4 => 4444, 7 => 7777' file &&
        git svn dcommit &&
        svn_cmd up tmp &&
        cd tmp &&
-               test x\"\`sed -n -e 4p < file\`\" = x4444 &&
-               test x\"\`sed -n -e 7p < file\`\" = x7777 &&
-               test x\"\`sed -n -e 58p < file\`\" = x5588 &&
-               test x\"\`sed -n -e 61p < file\`\" = x6611
+               test x\"\$(sed -n -e 4p < file)\" = x4444 &&
+               test x\"\$(sed -n -e 7p < file)\" = x7777 &&
+               test x\"\$(sed -n -e 58p < file)\" = x5588 &&
+               test x\"\$(sed -n -e 61p < file)\" = x6611
        "
 
 test_expect_success 'attempt to dcommit with a dirty index' '
index 2937f4c265b26a92f9ce0634c6e7df578c6c781a..7d7e9d46bc6bf40f52efffede6b369f052c46843 100755 (executable)
@@ -37,7 +37,7 @@ test_expect_success 'import authors with prog and file' '
 test_expect_success 'imported 6 revisions successfully' '
        (
                cd x
-               test "`git rev-list refs/remotes/git-svn | wc -l`" -eq 6
+               test "$(git rev-list refs/remotes/git-svn | wc -l)" -eq 6
        )
 '
 
index 65591374938b0d8967e6cbc7fe6a96746304bff0..3bbf341f6a5b176a96bb00c5644d294e13c0cc43 100755 (executable)
@@ -17,8 +17,8 @@ test_expect_success 'git svn clone --stdlayout sets up trunk as master' '
        git svn clone -s "$svnrepo" g &&
        (
                cd g &&
-               test x`git rev-parse --verify refs/remotes/origin/trunk^0` = \
-                    x`git rev-parse --verify refs/heads/master^0`
+               test x$(git rev-parse --verify refs/remotes/origin/trunk^0) = \
+                    x$(git rev-parse --verify refs/heads/master^0)
        )
 '
 
index 24c2421bfc1acd7248fc8094ad76096f12579992..1bb676bedef9d19fdce8bd3c595a979d0b1a9eea 100755 (executable)
@@ -19,7 +19,7 @@ test_expect_success 'load svk depot' "
 uuid=b48289b2-9c08-4d72-af37-0358a40b9c15
 
 test_expect_success 'svk merges were represented coming in' "
-       [ `git cat-file commit HEAD | grep parent | wc -l` -eq 2 ]
+       [ $(git cat-file commit HEAD | grep parent | wc -l) -eq 2 ]
        "
 
 test_done
index 14a938402e099744d6c334b7b5bb2c9ee835be3c..4c5f3c9d418bf6f85f1067b2cb1481bf941ff954 100755 (executable)
@@ -171,10 +171,10 @@ test_expect_success 'A: verify tag/series-A-blob' '
 
 test_expect_success 'A: verify marks output' '
        cat >expect <<-EOF &&
-       :2 `git rev-parse --verify master:file2`
-       :3 `git rev-parse --verify master:file3`
-       :4 `git rev-parse --verify master:file4`
-       :5 `git rev-parse --verify master^0`
+       :2 $(git rev-parse --verify master:file2)
+       :3 $(git rev-parse --verify master:file3)
+       :4 $(git rev-parse --verify master:file4)
+       :5 $(git rev-parse --verify master^0)
        EOF
        test_cmp expect marks.out
 '
@@ -264,8 +264,8 @@ test_expect_success 'A: verify diff' '
        EOF
        git diff-tree -M -r master verify--import-marks >actual &&
        compare_diff_raw expect actual &&
-       test `git rev-parse --verify master:file2` \
-           = `git rev-parse --verify verify--import-marks:copy-of-file2`
+       test $(git rev-parse --verify master:file2) \
+           = $(git rev-parse --verify verify--import-marks:copy-of-file2)
 '
 
 test_expect_success 'A: export marks with large values' '
@@ -364,7 +364,7 @@ test_expect_success 'B: accept branch name "TEMP_TAG"' '
                git prune" &&
        git fast-import <input &&
        test -f .git/TEMP_TAG &&
-       test `git rev-parse master` = `git rev-parse TEMP_TAG^`
+       test $(git rev-parse master) = $(git rev-parse TEMP_TAG^)
 '
 
 test_expect_success 'B: accept empty committer' '
@@ -473,8 +473,8 @@ test_expect_success 'B: fail on invalid committer (5)' '
 ###
 
 test_expect_success 'C: incremental import create pack from stdin' '
-       newf=`echo hi newf | git hash-object -w --stdin` &&
-       oldf=`git rev-parse --verify master:file2` &&
+       newf=$(echo hi newf | git hash-object -w --stdin) &&
+       oldf=$(git rev-parse --verify master:file2) &&
        test_tick &&
        cat >input <<-INPUT_END &&
        commit refs/heads/branch
@@ -499,13 +499,13 @@ test_expect_success 'C: verify pack' '
 '
 
 test_expect_success 'C: validate reuse existing blob' '
-       test $newf = `git rev-parse --verify branch:file2/newf` &&
-       test $oldf = `git rev-parse --verify branch:file2/oldf`
+       test $newf = $(git rev-parse --verify branch:file2/newf) &&
+       test $oldf = $(git rev-parse --verify branch:file2/oldf)
 '
 
 test_expect_success 'C: verify commit' '
        cat >expect <<-EOF &&
-       parent `git rev-parse --verify master^0`
+       parent $(git rev-parse --verify master^0)
        author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
        committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
 
@@ -624,7 +624,7 @@ test_expect_success 'E: verify commit' '
 ###
 
 test_expect_success 'F: non-fast-forward update skips' '
-       old_branch=`git rev-parse --verify branch^0` &&
+       old_branch=$(git rev-parse --verify branch^0) &&
        test_tick &&
        cat >input <<-INPUT_END &&
        commit refs/heads/branch
@@ -642,7 +642,7 @@ test_expect_success 'F: non-fast-forward update skips' '
 
        test_must_fail git fast-import <input &&
        # branch must remain unaffected
-       test $old_branch = `git rev-parse --verify branch^0`
+       test $old_branch = $(git rev-parse --verify branch^0)
 '
 
 test_expect_success 'F: verify pack' '
@@ -651,8 +651,8 @@ test_expect_success 'F: verify pack' '
 
 test_expect_success 'F: verify other commit' '
        cat >expect <<-EOF &&
-       tree `git rev-parse branch~1^{tree}`
-       parent `git rev-parse branch~1`
+       tree $(git rev-parse branch~1^{tree})
+       parent $(git rev-parse branch~1)
        author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
        committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
 
@@ -667,7 +667,7 @@ test_expect_success 'F: verify other commit' '
 ###
 
 test_expect_success 'G: non-fast-forward update forced' '
-       old_branch=`git rev-parse --verify branch^0` &&
+       old_branch=$(git rev-parse --verify branch^0) &&
        test_tick &&
        cat >input <<-INPUT_END &&
        commit refs/heads/branch
@@ -687,8 +687,8 @@ test_expect_success 'G: verify pack' '
 '
 
 test_expect_success 'G: branch changed, but logged' '
-       test $old_branch != `git rev-parse --verify branch^0` &&
-       test $old_branch = `git rev-parse --verify branch@{1}`
+       test $old_branch != $(git rev-parse --verify branch^0) &&
+       test $old_branch = $(git rev-parse --verify branch@{1})
 '
 
 ###
@@ -763,7 +763,7 @@ test_expect_success 'I: export-pack-edges' '
 
 test_expect_success 'I: verify edge list' '
        cat >expect <<-EOF &&
-       .git/objects/pack/pack-.pack: `git rev-parse --verify export-boundary`
+       .git/objects/pack/pack-.pack: $(git rev-parse --verify export-boundary)
        EOF
        sed -e s/pack-.*pack/pack-.pack/ edges.list >actual &&
        test_cmp expect actual
@@ -795,8 +795,8 @@ test_expect_success 'J: reset existing branch creates empty commit' '
        git fast-import <input
 '
 test_expect_success 'J: branch has 1 commit, empty tree' '
-       test 1 = `git rev-list J | wc -l` &&
-       test 0 = `git ls-tree J | wc -l`
+       test 1 = $(git rev-list J | wc -l) &&
+       test 0 = $(git ls-tree J | wc -l)
 '
 
 test_expect_success 'J: tag must fail on empty branch' '
@@ -838,8 +838,8 @@ test_expect_success 'K: reinit branch with from' '
        git fast-import <input
 '
 test_expect_success 'K: verify K^1 = branch^1' '
-       test `git rev-parse --verify branch^1` \
-               = `git rev-parse --verify K^1`
+       test $(git rev-parse --verify branch^1) \
+               = $(git rev-parse --verify K^1)
 '
 
 ###
@@ -929,7 +929,7 @@ test_expect_success 'L: nested tree copy does not corrupt deltas' '
        git ls-tree L2 g/b/ >tmp &&
        cat tmp | cut -f 2 >actual &&
        test_cmp expect actual &&
-       git fsck `git rev-parse L2`
+       git fsck $(git rev-parse L2)
 '
 
 ###
@@ -1106,7 +1106,7 @@ test_expect_success 'N: copy dirty subdirectory' '
        INPUT_END
 
        git fast-import <input &&
-       test `git rev-parse N2^{tree}` = `git rev-parse N3^{tree}`
+       test $(git rev-parse N2^{tree}) = $(git rev-parse N3^{tree})
 '
 
 test_expect_success 'N: copy directory by id' '
@@ -1503,7 +1503,7 @@ test_expect_success 'O: comments are all skipped' '
        INPUT_END
 
        git fast-import <input &&
-       test `git rev-parse N3` = `git rev-parse O1`
+       test $(git rev-parse N3) = $(git rev-parse O1)
 '
 
 test_expect_success 'O: blank lines not necessary after data commands' '
@@ -1524,7 +1524,7 @@ test_expect_success 'O: blank lines not necessary after data commands' '
        INPUT_END
 
        git fast-import <input &&
-       test `git rev-parse N3` = `git rev-parse O2`
+       test $(git rev-parse N3) = $(git rev-parse O2)
 '
 
 test_expect_success 'O: repack before next test' '
@@ -1570,8 +1570,8 @@ test_expect_success 'O: blank lines not necessary after other commands' '
        INPUT_END
 
        git fast-import <input &&
-       test 8 = `find .git/objects/pack -type f | wc -l` &&
-       test `git rev-parse refs/tags/O3-2nd` = `git rev-parse O3^` &&
+       test 8 = $(find .git/objects/pack -type f | wc -l) &&
+       test $(git rev-parse refs/tags/O3-2nd) = $(git rev-parse O3^) &&
        git log --reverse --pretty=oneline O3 | sed s/^.*z// >actual &&
        test_cmp expect actual
 '
@@ -1631,7 +1631,7 @@ test_expect_success 'P: superproject & submodule mix' '
        data <<DATAEND
        [submodule "sub"]
                path = sub
-               url = "`pwd`/sub"
+               url = "$(pwd)/sub"
        DATAEND
 
        commit refs/heads/subuse1
@@ -1691,7 +1691,7 @@ test_expect_success 'P: verbatim SHA gitlinks' '
        data <<DATAEND
        [submodule "sub"]
                path = sub
-               url = "`pwd`/sub"
+               url = "$(pwd)/sub"
        DATAEND
 
        commit refs/heads/subuse2
@@ -1978,7 +1978,7 @@ test_expect_success 'Q: verify first note for third commit' '
 
 test_expect_success 'Q: verify second notes commit' '
        cat >expect <<-EOF &&
-       parent `git rev-parse --verify refs/notes/foobar~2`
+       parent $(git rev-parse --verify refs/notes/foobar~2)
        author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
        committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
 
@@ -2045,7 +2045,7 @@ test_expect_success 'Q: verify third note for first commit' '
 
 test_expect_success 'Q: verify fourth notes commit' '
        cat >expect <<-EOF &&
-       parent `git rev-parse --verify refs/notes/foobar^`
+       parent $(git rev-parse --verify refs/notes/foobar^)
        author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
        committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
 
index 66c8b0a371e37f90cff8da0c92f09c8784ec45a2..b5149fde6ecda2b3de5ed60f43c60ab70230289c 100755 (executable)
@@ -163,7 +163,7 @@ test_expect_success 'setup submodule' '
                git add file &&
                git commit -m sub_initial
        ) &&
-       git submodule add "`pwd`/sub" sub &&
+       git submodule add "$(pwd)/sub" sub &&
        git commit -m initial &&
        test_tick &&
        (
@@ -377,7 +377,7 @@ test_expect_success 'full-tree re-shows unmodified files'        '
 
 test_expect_success 'set-up a few more tags for tag export tests' '
        git checkout -f master &&
-       HEAD_TREE=`git show -s --pretty=raw HEAD | grep tree | sed "s/tree //"` &&
+       HEAD_TREE=$(git show -s --pretty=raw HEAD | grep tree | sed "s/tree //") &&
        git tag    tree_tag        -m "tagging a tree" $HEAD_TREE &&
        git tag -a tree_tag-obj    -m "tagging a tree" $HEAD_TREE &&
        git tag    tag-obj_tag     -m "tagging a tag" tree_tag-obj &&
@@ -422,7 +422,7 @@ test_expect_success 'directory becomes symlink'        '
 test_expect_success 'fast-export quotes pathnames' '
        git init crazy-paths &&
        (cd crazy-paths &&
-        blob=`echo foo | git hash-object -w --stdin` &&
+        blob=$(echo foo | git hash-object -w --stdin) &&
         git update-index --add \
                --cacheinfo 100644 $blob "$(printf "path with\\nnewline")" \
                --cacheinfo 100644 $blob "path with \"quote\"" \
index d3a5bac754fd8a80a0df0c091fe0769f74f16a4d..2a0ffed870dd8634466bccfd0e435b5a304f8818 100755 (executable)
@@ -100,14 +100,14 @@ test_expect_success 'snapshots: bad tree-ish id (tagged object)' '
        echo object > tag-object &&
        git add tag-object &&
        test_tick && git commit -m "Object to be tagged" &&
-       git tag tagged-object `git hash-object tag-object` &&
+       git tag tagged-object $(git hash-object tag-object) &&
        gitweb_run "p=.git;a=snapshot;h=tagged-object;sf=tgz" &&
        grep "400 - Object is not a tree-ish" gitweb.output
 '
 test_debug 'cat gitweb.output'
 
 test_expect_success 'snapshots: good object id' '
-       ID=`git rev-parse --verify HEAD` &&
+       ID=$(git rev-parse --verify HEAD) &&
        gitweb_run "p=.git;a=snapshot;h=$ID;sf=tgz" &&
        grep "Status: 200 OK" gitweb.output
 '
@@ -173,7 +173,7 @@ test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (unmod
 test_debug 'cat gitweb.headers'
 
 test_expect_success DATE_PARSER 'modification: tree snapshot' '
-       ID=`git rev-parse --verify HEAD^{tree}` &&
+       ID=$(git rev-parse --verify HEAD^{tree}) &&
        HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
        export HTTP_IF_MODIFIED_SINCE &&
        test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
index b0a6bad8ddb6b2e49b0f5620da92b1ca912136c4..de7152f82713bf797aecd3f53bce6ef006524b7b 100755 (executable)
@@ -43,7 +43,7 @@ test_expect_success \
        echo fake: "$@"
        EOF
        chmod +x "fake browser" &&
-       git config browser.w3m.path "`pwd`/fake browser" &&
+       git config browser.w3m.path "$(pwd)/fake browser" &&
        test_web_browse w3m http://example.com/foo
 '
 
index 0f0bc5d02f4dcbd67c6d405350e5aaeb39f44bfb..cef4bcc8664a1023de074d1355c358450dc4057e 100755 (executable)
@@ -6,13 +6,13 @@ dd if=/dev/zero bs=1048576 count=100 2>/dev/null |
 while read expect cnt pfx
 do
        case "$expect" in '#'*) continue ;; esac
-       actual=`
+       actual=$(
                {
                        test -z "$pfx" || echo "$pfx"
                        dd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null |
                        perl -pe 'y/\000/g/'
                } | ./test-sha1 $cnt
-       `
+       )
        if test "$expect" = "$actual"
        then
                echo "OK: $expect $cnt $pfx"
@@ -51,14 +51,14 @@ exit
 
 while read cnt pfx
 do
-       actual=`
+       actual=$(
                {
                        test -z "$pfx" || echo "$pfx"
                        dd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null |
                        perl -pe 'y/\000/g/'
                } | sha1sum |
                sed -e 's/ .*//'
-       `
+       )
        echo "$actual $cnt $pfx"
 done <<EOF
 0
index 5252de4b252070637c1b4badf7989e791f3b8c75..fee21d24e8ab89208b4aa0af7007b7c033b753bc 100644 (file)
@@ -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