summaryrefslogtreecommitdiff
path: root/contrib/examples/git-checkout.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-04-21 17:42:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-04-21 17:42:42 (GMT)
commit0e6e1a5fbdd3143b74bf45f009bb4e850bdc785a (patch)
tree01e676502b1bd1c4a84aa3d3ebbb62d6d75eba37 /contrib/examples/git-checkout.sh
parentcc291953df19aa4a97bee3590e708dc1fc557500 (diff)
parentbd368a9baf5a42e2076ef4c8a35312ccab171452 (diff)
downloadgit-0e6e1a5fbdd3143b74bf45f009bb4e850bdc785a.zip
git-0e6e1a5fbdd3143b74bf45f009bb4e850bdc785a.tar.gz
git-0e6e1a5fbdd3143b74bf45f009bb4e850bdc785a.tar.bz2
Merge branch 'ep/shell-command-substitution'
* 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
Diffstat (limited to 'contrib/examples/git-checkout.sh')
-rwxr-xr-xcontrib/examples/git-checkout.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/examples/git-checkout.sh b/contrib/examples/git-checkout.sh
index d2c1f98..683cae7 100755
--- a/contrib/examples/git-checkout.sh
+++ b/contrib/examples/git-checkout.sh
@@ -222,7 +222,7 @@ else
# 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}}' &&
@@ -233,7 +233,7 @@ else
# 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 @@ if [ "$?" -eq 0 ]; then
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
@@ -282,7 +282,7 @@ if [ "$?" -eq 0 ]; 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"