summaryrefslogtreecommitdiff
path: root/contrib/examples/git-commit.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-04-21 10:42:41 -0700
committerJunio C Hamano <gitster@pobox.com>2014-04-21 10:42:42 -0700
commit0e6e1a5fbdd3143b74bf45f009bb4e850bdc785a (patch)
tree01e676502b1bd1c4a84aa3d3ebbb62d6d75eba37 /contrib/examples/git-commit.sh
parentcc291953df19aa4a97bee3590e708dc1fc557500 (diff)
parentbd368a9baf5a42e2076ef4c8a35312ccab171452 (diff)
downloadgit-0e6e1a5fbdd3143b74bf45f009bb4e850bdc785a.tar.gz
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-commit.sh')
-rwxr-xr-xcontrib/examples/git-commit.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/examples/git-commit.sh b/contrib/examples/git-commit.sh
index 4aab1a6d21..5cafe2eb77 100755
--- a/contrib/examples/git-commit.sh
+++ b/contrib/examples/git-commit.sh
@@ -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
@@ -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 @@ then
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 @@ then
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 |