Skip to content

Commit f257482

Browse files
devzero2000gitster
authored andcommitted
git-rebase--merge.sh: use the $( ... ) construct for command substitution
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <[email protected]> Reviewed-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent eadf619 commit f257482

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-rebase--merge.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ continue_merge () {
2424
die "$resolvemsg"
2525
fi
2626

27-
cmt=`cat "$state_dir/current"`
27+
cmt=$(cat "$state_dir/current")
2828
if ! git diff-index --quiet --ignore-submodules HEAD --
2929
then
3030
if ! git commit ${gpg_sign_opt:+"$gpg_sign_opt"} --no-verify -C "$cmt"
@@ -132,7 +132,7 @@ echo "$onto_name" > "$state_dir/onto_name"
132132
write_basic_state
133133

134134
msgnum=0
135-
for cmt in `git rev-list --reverse --no-merges "$revisions"`
135+
for cmt in $(git rev-list --reverse --no-merges "$revisions")
136136
do
137137
msgnum=$(($msgnum + 1))
138138
echo "$cmt" > "$state_dir/cmt.$msgnum"

0 commit comments

Comments
 (0)