summaryrefslogtreecommitdiff
path: root/t/t4135/add-with spaces.diff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-08 21:43:20 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-09 09:19:42 -0700
commit365c2aaafcdefa65db994ff13071a3a7cd7910fc (patch)
treeb15223b0f09399286469e4837f42b849c2ac8c82 /t/t4135/add-with spaces.diff
parente41d718c7df31c891b242bcf3a1cfea812308e40 (diff)
downloadgit-365c2aaafcdefa65db994ff13071a3a7cd7910fc.tar.gz
t1507: avoid "${parameter<op>'word'}" inside double-quotes
Kacper Kornet noticed that a $variable in "word" in the above construct is not substituted by his pdksh. Modern POSIX compliant shells (e.g. dash, ksh, bash) all seem to interpret POSIX "2.6.2 Parameter Expansion" that says "word shall be subjected to tilde expansion, parameter expansion, command substitution, and arithmetic expansion" in ${parameter<op>word}, to mean that the word is expanded as if it appeared in dq pairs, so if the word were "'$variable'" (sans dq) it would expand to a single quote, the value of the $variable and then a single quote. Johannes Sixt reports that the behavior of quoting at the right of :- when the ${...:-...} expansion appears in double-quotes was debated recently at length at the Austin group. We can avoid this issue and future-proof the test by a slight rewrite. Helped-by: Johannes Sixt <j.sixt@viscovery.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4135/add-with spaces.diff')
0 files changed, 0 insertions, 0 deletions