{"thread":{"id":"10552","subject":"[PATCH] rebase: standardize on $() for command substitution","startedAt":"2007-11-01T04:50:08Z","lastAt":"2007-11-01T05:27:59Z","messageCount":3,"participants":["Dan McGee","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"57779","messageId":"1193892608-31322-1-git-send-email-dpmcgee@gmail.com","threadId":"10552","inReplyTo":null,"subject":"[PATCH] rebase: standardize on $() for command substitution","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2007-11-01T04:50:08Z","receivedAt":"2007-11-01T04:50:08Z","isPatch":true,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"Commit 889a50e909dba5f4416049afc5eeae601fe133bc changed several `` to $()\nformat for command substitution, so we should standardize on one format\nfor clarity.\n\nSigned-off-by: Dan McGee <dpmcgee@gmail.com>\n---\n git-rebase.sh |   16 ++++++++--------\n 1 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 224cca9..63dea56 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -59,7 +59,7 @@ continue_merge () {\n \t\tdie \"$RESOLVEMSG\"\n \tfi\n \n-\tcmt=`cat \"$dotest/current\"`\n+\tcmt=$(cat \"$dotest/current\")\n \tif ! git diff-index --quiet HEAD\n \tthen\n \t\tif ! git-commit -C \"$cmt\"\n@@ -74,7 +74,7 @@ continue_merge () {\n \tfi\n \tgit rev-list --pretty=oneline -1 \"$cmt\" | sed -e 's/^[^ ]* //'\n \n-\tprev_head=`git rev-parse HEAD^0`\n+\tprev_head=$(git rev-parse HEAD^0)\n \t# save the resulting commit so we can read-tree on it later\n \techo \"$prev_head\" > \"$dotest/prev_head\"\n \n@@ -203,7 +203,7 @@ do\n \t-s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)\n \t\tcase \"$#,$1\" in\n \t\t*,*=*)\n-\t\t\tstrategy=`expr \"z$1\" : 'z-[^=]*=\\(.*\\)'` ;;\n+\t\t\tstrategy=$(expr \"z$1\" : 'z-[^=]*=\\(.*\\)'` ;)\n \t\t1,*)\n \t\t\tusage ;;\n \t\t*)\n@@ -265,7 +265,7 @@ esac\n \n # The upstream head must be given.  Make sure it is valid.\n upstream_name=\"$1\"\n-upstream=`git rev-parse --verify \"${upstream_name}^0\"` ||\n+upstream=$(git rev-parse --verify \"${upstream_name}^0\") ||\n     die \"invalid upstream $upstream_name\"\n \n # Make sure the branch to rebase onto is valid.\n@@ -288,9 +288,9 @@ case \"$#\" in\n \tgit-checkout \"$2\" || usage\n \t;;\n *)\n-\tif branch_name=`git symbolic-ref -q HEAD`\n+\tif branch_name=$(git symbolic-ref -q HEAD)\n \tthen\n-\t\tbranch_name=`expr \"z$branch_name\" : 'zrefs/heads/\\(.*\\)'`\n+\t\tbranch_name=$(expr \"z$branch_name\" : 'zrefs/heads/\\(.*\\)')\n \telse\n \t\tbranch_name=HEAD ;# detached\n \tfi\n@@ -343,11 +343,11 @@ fi\n mkdir -p \"$dotest\"\n echo \"$onto\" > \"$dotest/onto\"\n echo \"$onto_name\" > \"$dotest/onto_name\"\n-prev_head=`git rev-parse HEAD^0`\n+prev_head=$(git rev-parse HEAD^0)\n echo \"$prev_head\" > \"$dotest/prev_head\"\n \n msgnum=0\n-for cmt in `git rev-list --reverse --no-merges \"$upstream\"..ORIG_HEAD`\n+for cmt in $(git rev-list --reverse --no-merges \"$upstream\"..ORIG_HEAD)\n do\n \tmsgnum=$(($msgnum + 1))\n \techo \"$cmt\" > \"$dotest/cmt.$msgnum\"\n-- \n1.5.3.5\n"},{"id":"57781","messageId":"7vr6jaczps.fsf@gitster.siamese.dyndns.org","threadId":"10552","inReplyTo":"1193892608-31322-1-git-send-email-dpmcgee@gmail.com","subject":"Re: [PATCH] rebase: standardize on $() for command substitution","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-11-01T05:16:31Z","receivedAt":"2007-11-01T05:16:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dan McGee <dpmcgee@gmail.com> writes:\n\n> Commit 889a50e909dba5f4416049afc5eeae601fe133bc changed several `` to $()\n> format for command substitution, so we should standardize on one format\n> for clarity.\n> ...\n> @@ -203,7 +203,7 @@ do\n>  \t-s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)\n>  \t\tcase \"$#,$1\" in\n>  \t\t*,*=*)\n> -\t\t\tstrategy=`expr \"z$1\" : 'z-[^=]*=\\(.*\\)'` ;;\n> +\t\t\tstrategy=$(expr \"z$1\" : 'z-[^=]*=\\(.*\\)'` ;)\n>  \t\t1,*)\n>  \t\t\tusage ;;\n>  \t\t*)\n\nThe patch might have meant well, but it is a rather unnecessary\ncode churn without fixing anything and introducing a bug X-<.\n"},{"id":"57782","messageId":"449c10960710312227s6688cc5fne9ff246e042cdc3c@mail.gmail.com","threadId":"10552","inReplyTo":"7vr6jaczps.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] rebase: standardize on $() for command substitution","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2007-11-01T05:27:59Z","receivedAt":"2007-11-01T05:27:59Z","isPatch":true,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"On 11/1/07, Junio C Hamano <gitster@pobox.com> wrote:\n> Dan McGee <dpmcgee@gmail.com> writes:\n>\n> > Commit 889a50e909dba5f4416049afc5eeae601fe133bc changed several `` to $()\n> > format for command substitution, so we should standardize on one format\n> > for clarity.\n> > ...\n> > @@ -203,7 +203,7 @@ do\n> >       -s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)\n> >               case \"$#,$1\" in\n> >               *,*=*)\n> > -                     strategy=`expr \"z$1\" : 'z-[^=]*=\\(.*\\)'` ;;\n> > +                     strategy=$(expr \"z$1\" : 'z-[^=]*=\\(.*\\)'` ;)\n> >               1,*)\n> >                       usage ;;\n> >               *)\n>\n> The patch might have meant well, but it is a rather unnecessary\n> code churn without fixing anything and introducing a bug X-<.\n\nWow, back to the drawing board here. I've been up too long today.\n\n-Dan\n"}]}