Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2018-08-13 11:47:36 +0300
committerJunio C Hamano <gitster@pobox.com>2018-08-13 22:22:11 +0300
commit06fc5c9f90da9be18371bafad5f35b6b17cbf49e (patch)
tree63a687d5cf04e2e1a0d9a70ffacc8c0dbbbd38df /t/chainlint.sed
parent7e32a31b2101c3ced65ea9367c747930a4eb39d9 (diff)
chainlint: recognize multi-line $(...) when command cuddled with "$("
For multi-line $(...) expressions nested within subshells, chainlint.sed only recognizes: x=$( echo foo && ... but it is not unlikely that test authors may also cuddle the command with the opening "$(", so support that style, as well: x=$(echo foo && ... The closing ")" is already correctly recognized when cuddled or not. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/chainlint.sed')
-rw-r--r--t/chainlint.sed2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/chainlint.sed b/t/chainlint.sed
index 2901494e8a..afb2443a9c 100644
--- a/t/chainlint.sed
+++ b/t/chainlint.sed
@@ -216,7 +216,7 @@ s/.*\n//
# "$(...)" -- command substitution; not closing ")"
/\$([^)][^)]*)[^)]*$/bcheckchain
# multi-line "$(...\n...)" -- command substitution; treat as nested subshell
-/\$([ ]*$/bnest
+/\$([^)]*$/bnest
# "=(...)" -- Bash array assignment; not closing ")"
/=(/bcheckchain
# closing "...) &&"