git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/14] t3905-stash-include-untracked.sh: use the $( ... ) construct for command substitution
@ 2014-04-30 16:22 Elia Pinto
  2014-04-30 16:22 ` [PATCH 02/14] t3910-mac-os-precompose.sh: " Elia Pinto
                   ` (13 more replies)
  0 siblings, 14 replies; 16+ messages in thread
From: Elia Pinto @ 2014-04-30 16:22 UTC (permalink / raw)
  To: git; +Cc: matthieu.moy, Elia Pinto

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 <gitter.spiros@gmail.com>
---
 t/t3905-stash-include-untracked.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t3905-stash-include-untracked.sh b/t/t3905-stash-include-untracked.sh
index a5e7e6b..f372fc8 100755
--- a/t/t3905-stash-include-untracked.sh
+++ b/t/t3905-stash-include-untracked.sh
@@ -96,8 +96,8 @@ test_expect_success 'stash pop after save --include-untracked leaves files untra
 	git stash pop &&
 	git status --porcelain >actual &&
 	test_cmp expect actual &&
-	test "1" = "`cat file2`" &&
-	test untracked = "`cat untracked/untracked`"
+	test "1" = "$(cat file2)" &&
+	test untracked = "$(cat untracked/untracked)"
 '
 
 git clean --force --quiet -d
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-04-30 18:07 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-30 16:22 [PATCH 01/14] t3905-stash-include-untracked.sh: use the $( ... ) construct for command substitution Elia Pinto
2014-04-30 16:22 ` [PATCH 02/14] t3910-mac-os-precompose.sh: " Elia Pinto
2014-04-30 16:22 ` [PATCH 03/14] t4006-diff-mode.sh: " Elia Pinto
2014-04-30 16:22 ` [PATCH 04/14] t4010-diff-pathspec.sh: " Elia Pinto
2014-04-30 16:22 ` [PATCH 05/14] t4012-diff-binary.sh: " Elia Pinto
2014-04-30 16:22 ` [PATCH 06/14] t4013-diff-various.sh: " Elia Pinto
2014-04-30 16:23 ` [PATCH 07/14] t4014-format-patch.sh: " Elia Pinto
2014-04-30 16:23 ` [PATCH 08/14] t4036-format-patch-signer-mime.sh: " Elia Pinto
2014-04-30 16:23 ` [PATCH 09/14] t4038-diff-combined.sh: " Elia Pinto
2014-04-30 16:23 ` [PATCH 10/14] t4057-diff-combined-paths.sh: " Elia Pinto
2014-04-30 16:23 ` [PATCH 11/14] t4116-apply-reverse.sh: " Elia Pinto
2014-04-30 16:23 ` [PATCH 12/14] t4119-apply-config.sh: " Elia Pinto
2014-04-30 16:23 ` [PATCH 13/14] t4204-patch-id.sh: " Elia Pinto
2014-04-30 16:23 ` [PATCH 14/14] t5000-tar-tree.sh: " Elia Pinto
2014-04-30 16:42 ` [PATCH 01/14] t3905-stash-include-untracked.sh: " Matthieu Moy
2014-04-30 18:07   ` Junio C Hamano

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).