Merge branch 'ep/shell-command-substitution'
authorJunio C Hamano <gitster@pobox.com>
Mon, 21 Apr 2014 17:42:41 +0000 (10:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Apr 2014 17:42:42 +0000 (10:42 -0700)
* ep/shell-command-substitution:
t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command substitution
t9360-mw-to-git-clone.sh: use the $( ... ) construct for command substitution
git-tag.sh: use the $( ... ) construct for command substitution
git-revert.sh: use the $( ... ) construct for command substitution
git-resolve.sh: use the $( ... ) construct for command substitution
git-repack.sh: use the $( ... ) construct for command substitution
git-merge.sh: use the $( ... ) construct for command substitution
git-ls-remote.sh: use the $( ... ) construct for command substitution
git-fetch.sh: use the $( ... ) construct for command substitution
git-commit.sh: use the $( ... ) construct for command substitution
git-clone.sh: use the $( ... ) construct for command substitution
git-checkout.sh: use the $( ... ) construct for command substitution
install-webdoc.sh: use the $( ... ) construct for command substitution
howto-index.sh: use the $( ... ) construct for command substitution

1  2 
contrib/examples/git-checkout.sh
contrib/examples/git-commit.sh
index d2c1f98b8628e2b807bc49ff310097686f3da6e6,22a3db2d0e25ce9d4fa00c976681eb801ef63174..683cae7c3fad09bec012351b530b7e909d70890f
@@@ -168,7 -168,7 +168,7 @@@ cd_to_topleve
  # branch.  However, if "git checkout HEAD" detaches the HEAD
  # from the current branch, even though that may be logically
  # correct, it feels somewhat funny.  More importantly, we do not
 -# want "git checkout" nor "git checkout -f" to detach HEAD.
 +# want "git checkout" or "git checkout -f" to detach HEAD.
  
  detached=
  detach_warn=
@@@ -222,7 -222,7 +222,7 @@@ els
  
        # Match the index to the working tree, and do a three-way.
        git diff-files --name-only | git update-index --remove --stdin &&
-       work=`git write-tree` &&
+       work=$(git write-tree) &&
        git read-tree $v --reset -u $new || exit
  
        eval GITHEAD_$new='${new_name:-${branch:-$new}}' &&
        # Do not register the cleanly merged paths in the index yet.
        # this is not a real merge before committing, but just carrying
        # the working tree changes along.
-       unmerged=`git ls-files -u`
+       unmerged=$(git ls-files -u)
        git read-tree $v --reset $new
        case "$unmerged" in
        '')     ;;
@@@ -269,7 -269,7 +269,7 @@@ if [ "$?" -eq 0 ]; the
        fi
        if test -n "$branch"
        then
-               old_branch_name=`expr "z$oldbranch" : 'zrefs/heads/\(.*\)'`
+               old_branch_name=$(expr "z$oldbranch" : 'zrefs/heads/\(.*\)')
                GIT_DIR="$GIT_DIR" git symbolic-ref -m "checkout: moving from ${old_branch_name:-$old} to $branch" HEAD "refs/heads/$branch"
                if test -n "$quiet"
                then
                fi
        elif test -n "$detached"
        then
-               old_branch_name=`expr "z$oldbranch" : 'zrefs/heads/\(.*\)'`
+               old_branch_name=$(expr "z$oldbranch" : 'zrefs/heads/\(.*\)')
                git update-ref --no-deref -m "checkout: moving from ${old_branch_name:-$old} to $arg" HEAD "$detached" ||
                        die "Cannot detach HEAD"
                if test -n "$detach_warn"
index 4aab1a6d2161186227779ca5e793ed727c64d9db,e80155c2687d6f785b2c05c87304037494bf0e19..5cafe2eb7715123ba0d748be308f35731ea89ddb
@@@ -91,7 -91,7 +91,7 @@@ signoff
  force_author=
  only_include_assumed=
  untracked_files=
- templatefile="`git config commit.template`"
+ templatefile="$(git config commit.template)"
  while test $# != 0
  do
        case "$1" in
@@@ -280,7 -280,7 +280,7 @@@ case "$#,$also,$only,$amend" i
  0,,,*)
        ;;
  *,,,*)
 -      only_include_assumed="# Explicit paths specified without -i nor -o; assuming --only paths..."
 +      only_include_assumed="# Explicit paths specified without -i or -o; assuming --only paths..."
        also=
        ;;
  esac
@@@ -350,7 -350,7 +350,7 @@@ t,
                TMP_INDEX="$GIT_DIR/tmp-index$$"
                W=
                test -z "$initial_commit" && W=--with-tree=HEAD
-               commit_only=`git ls-files --error-unmatch $W -- "$@"` || exit
+               commit_only=$(git ls-files --error-unmatch $W -- "$@") || exit
  
                # Build a temporary index and update the real index
                # the same way.
@@@ -475,8 -475,8 +475,8 @@@ the
  fi
  if test '' != "$force_author"
  then
-       GIT_AUTHOR_NAME=`expr "z$force_author" : 'z\(.*[^ ]\) *<.*'` &&
-       GIT_AUTHOR_EMAIL=`expr "z$force_author" : '.*\(<.*\)'` &&
+       GIT_AUTHOR_NAME=$(expr "z$force_author" : 'z\(.*[^ ]\) *<.*') &&
+       GIT_AUTHOR_EMAIL=$(expr "z$force_author" : '.*\(<.*\)') &&
        test '' != "$GIT_AUTHOR_NAME" &&
        test '' != "$GIT_AUTHOR_EMAIL" ||
        die "malformed --author parameter"
@@@ -489,7 -489,7 +489,7 @@@ the
        rloga='commit'
        if [ -f "$GIT_DIR/MERGE_HEAD" ]; then
                rloga='commit (merge)'
-               PARENTS="-p HEAD "`sed -e 's/^/-p /' "$GIT_DIR/MERGE_HEAD"`
+               PARENTS="-p HEAD "$(sed -e 's/^/-p /' "$GIT_DIR/MERGE_HEAD")
        elif test -n "$amend"; then
                rloga='commit (amend)'
                PARENTS=$(git cat-file commit HEAD |