Ævar Arnfjörð Bjarmason <[email protected]> writes:
> Improve the portability of chainlint by using shorter here-docs. On
> AIX sed will complain about:
>
> sed: 0602-417 The label :hereslurp is greater than eight
> characters
>
> As noted in [1] there's still a remaining recently introduced
> portability issue also introduced in 878f988350 ("t/test-lib: teach
> --chain-lint to detect broken &&-chains in subshells", 2018-07-11), so
> under AIX the tests must be run with GIT_TEST_CHAIN_LINT=0.
>
> I don't know how to solve the other issue, and this gets us some of
> the way to GIT_TEST_CHAIN_LINT=1 working again on AIX.
>
> 1. https://public-inbox.org/git/[email protected]/
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]>
> ---
I'll globally do s/here-doc/label/ while queueing.
POSIX says "The implementation shall support label arguments
recognized as unique up to at least 8 bytes", so replacing these
labels to shorter strings makes perfect sense.
Will queue; thanks.
> t/chainlint.sed | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/t/chainlint.sed b/t/chainlint.sed
> index 8544df38df..2333705b27 100644
> --- a/t/chainlint.sed
> +++ b/t/chainlint.sed
> @@ -97,11 +97,11 @@
> /<<[ ]*[-\\']*[A-Za-z0-9_]/ {
> s/^\(.*\)<<[ ]*[-\\']*\([A-Za-z0-9_][A-Za-z0-9_]*\)'*/<\2>\1<</
> s/[ ]*<<//
> - :hereslurp
> + :hered
> N
> /^<\([^>]*\)>.*\n[ ]*\1[ ]*$/!{
> s/\n.*$//
> - bhereslurp
> + bhered
> }
> s/^<[^>]*>//
> s/\n.*$//
> @@ -283,11 +283,11 @@ bfolded
> :heredoc
> s/^\(.*\)<<[ ]*[-\\']*\([A-Za-z0-9_][A-Za-z0-9_]*\)'*/<\2>\1<</
> s/[ ]*<<//
> -:hereslurpsub
> +:heredsub
> N
> /^<\([^>]*\)>.*\n[ ]*\1[ ]*$/!{
> s/\n.*$//
> - bhereslurpsub
> + bheredsub
> }
> s/^<[^>]*>//
> s/\n.*$//