]> git.ipfire.org Git - thirdparty/git.git/commit
chainlint.sed: make here-doc "<<-" operator recognition more POSIX-like
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 13 Dec 2021 06:30:55 +0000 (01:30 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Dec 2021 22:15:29 +0000 (14:15 -0800)
commit2d53614210919c2a4eac4a03e9d34da7b9e7ff31
tree76d0de2024e2841307f182fd9c1a996da1dfb03f
parent5be30d0cd301f50e5f4dd992bc11ce75f457cf46
chainlint.sed: make here-doc "<<-" operator recognition more POSIX-like

According to POSIX, "<<" and "<<-" are distinct shell operators. For the
latter to be recognized, no whitespace is allowed before the "-", though
whitespace is allowed after the operator. However, the chainlint
patterns which identify here-docs are both too loose and too tight,
incorrectly allowing whitespace between "<<" and "-" but disallowing it
between "-" and the here-doc tag. Fix the patterns to better match
POSIX.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/chainlint.sed