From: Dan McGee <dpmcgee@gmail.com>
To: git@vger.kernel.org
Cc: Dan McGee <dpmcgee@gmail.com>
Subject: [PATCH] rebase: standardize on $() for command substitution
Date: Wed, 31 Oct 2007 23:50:08 -0500 [thread overview]
Message-ID: <1193892608-31322-1-git-send-email-dpmcgee@gmail.com> (raw)
Commit 889a50e909dba5f4416049afc5eeae601fe133bc changed several `` to $()
format for command substitution, so we should standardize on one format
for clarity.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
git-rebase.sh | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index 224cca9..63dea56 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -59,7 +59,7 @@ continue_merge () {
die "$RESOLVEMSG"
fi
- cmt=`cat "$dotest/current"`
+ cmt=$(cat "$dotest/current")
if ! git diff-index --quiet HEAD
then
if ! git-commit -C "$cmt"
@@ -74,7 +74,7 @@ continue_merge () {
fi
git rev-list --pretty=oneline -1 "$cmt" | sed -e 's/^[^ ]* //'
- prev_head=`git rev-parse HEAD^0`
+ prev_head=$(git rev-parse HEAD^0)
# save the resulting commit so we can read-tree on it later
echo "$prev_head" > "$dotest/prev_head"
@@ -203,7 +203,7 @@ do
-s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)
case "$#,$1" in
*,*=*)
- strategy=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;;
+ strategy=$(expr "z$1" : 'z-[^=]*=\(.*\)'` ;)
1,*)
usage ;;
*)
@@ -265,7 +265,7 @@ esac
# The upstream head must be given. Make sure it is valid.
upstream_name="$1"
-upstream=`git rev-parse --verify "${upstream_name}^0"` ||
+upstream=$(git rev-parse --verify "${upstream_name}^0") ||
die "invalid upstream $upstream_name"
# Make sure the branch to rebase onto is valid.
@@ -288,9 +288,9 @@ case "$#" in
git-checkout "$2" || usage
;;
*)
- if branch_name=`git symbolic-ref -q HEAD`
+ if branch_name=$(git symbolic-ref -q HEAD)
then
- branch_name=`expr "z$branch_name" : 'zrefs/heads/\(.*\)'`
+ branch_name=$(expr "z$branch_name" : 'zrefs/heads/\(.*\)')
else
branch_name=HEAD ;# detached
fi
@@ -343,11 +343,11 @@ fi
mkdir -p "$dotest"
echo "$onto" > "$dotest/onto"
echo "$onto_name" > "$dotest/onto_name"
-prev_head=`git rev-parse HEAD^0`
+prev_head=$(git rev-parse HEAD^0)
echo "$prev_head" > "$dotest/prev_head"
msgnum=0
-for cmt in `git rev-list --reverse --no-merges "$upstream"..ORIG_HEAD`
+for cmt in $(git rev-list --reverse --no-merges "$upstream"..ORIG_HEAD)
do
msgnum=$(($msgnum + 1))
echo "$cmt" > "$dotest/cmt.$msgnum"
--
1.5.3.5
next reply other threads:[~2007-11-01 4:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 4:50 Dan McGee [this message]
2007-11-01 5:16 ` [PATCH] rebase: standardize on $() for command substitution Junio C Hamano
2007-11-01 5:27 ` Dan McGee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1193892608-31322-1-git-send-email-dpmcgee@gmail.com \
--to=dpmcgee@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).