summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElia Pinto <gitter.spiros@gmail.com>2015-12-23 14:45:54 +0100
committerJunio C Hamano <gitster@pobox.com>2015-12-28 13:37:04 -0800
commite15243cc77a58a3038aac3a1977cc8fe0ab45898 (patch)
tree1c0ac8a5bea748d6cc45a22c1affdf2e04c1cce8
parentc00978144a523854171aa9ef2857dc16c08d34d4 (diff)
downloadgit-e15243cc77a58a3038aac3a1977cc8fe0ab45898.tar.gz
t/t5506-remote-groups.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 perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}" done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t5506-remote-groups.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5506-remote-groups.sh b/t/t5506-remote-groups.sh
index 530b01678e..83d5558c0e 100755
--- a/t/t5506-remote-groups.sh
+++ b/t/t5506-remote-groups.sh
@@ -20,7 +20,7 @@ update_repos() {
}
repo_fetched() {
- if test "`git log -1 --pretty=format:%s $1 --`" = "`cat mark`"; then
+ if test "$(git log -1 --pretty=format:%s $1 --)" = "$(cat mark)"; then
echo >&2 "repo was fetched: $1"
return 0
fi