Use redable $(<command>) syntax instead of backtics in code. See The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition Signed-off-by: Jari Aalto <jari.aalto AT cante.net> --- See http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03 git-rebase.sh | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/git-rebase.sh b/git-rebase.sh index bdcea0e..d2b329f 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -60,7 +60,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" @@ -75,7 +75,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" @@ -233,7 +233,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 ;; *) @@ -295,7 +295,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. @@ -318,9 +318,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 @@ -399,7 +399,7 @@ echo "$orig_head" > "$dotest/orig-head" echo "$head_name" > "$dotest/head-name" 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.4-rc5.GIT-dirty -- Welcome to FOSS revolution: we fix and modify until it shines - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html