From d0ea45bfc7129304016b24bdb18523b927d0ab17 Mon Sep 17 00:00:00 2001 From: Elia Pinto Date: Wed, 23 Apr 2014 06:44:01 -0700 Subject: [PATCH] git-stash.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 Reviewed-by: Matthieu Moy Signed-off-by: Junio C Hamano --- git-stash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-stash.sh b/git-stash.sh index 4798bcf0e..af549c731 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -13,7 +13,7 @@ USAGE="list [] SUBDIRECTORY_OK=Yes OPTIONS_SPEC= -START_DIR=`pwd` +START_DIR=$(pwd) . git-sh-setup . git-sh-i18n require_work_tree