On 04/19/2017 10:16 AM, Kevin Wolf wrote: > The only thing the escape characters achieve is making the reference > output unreadable and lines that are potentially so long that git > doesn't want to put them into an email any more. Let's filter them out. > > Signed-off-by: Kevin Wolf <[email protected]> > --- > tests/qemu-iotests/028.out | 2 +- > tests/qemu-iotests/051 | 3 +- > tests/qemu-iotests/051.out | 106 +++++++++++++++---------------- > tests/qemu-iotests/051.pc.out | 132 > +++++++++++++++++++-------------------- > tests/qemu-iotests/068 | 4 +- > tests/qemu-iotests/068.out | 6 +- > tests/qemu-iotests/130.out | 4 +- > tests/qemu-iotests/142 | 2 +- > tests/qemu-iotests/142.out | 10 +-- > tests/qemu-iotests/145 | 3 +- > tests/qemu-iotests/145.out | 2 +- > tests/qemu-iotests/common.filter | 7 +++ > tests/qemu-iotests/common.qemu | 4 +- > 13 files changed, 147 insertions(+), 138 deletions(-)
> +++ b/tests/qemu-iotests/common.filter
> @@ -86,6 +86,13 @@ _filter_qmp()
> -e ' QMP_VERSION'
> }
>
> +# readline makes HMP command strings so long that git complains
> +_filter_hmp()
> +{
> + sed -e $'s/^\((qemu) \)\\?.*\e\\[D/\\1/g' \
Inside $'', \ must be escaped to guarantee defined behavior in cases
where you want literal \ in the result (the fact that bash lets \( pass
through literally for now is not good to rely on).
sed -e $'s/^\\((qemu) \\)\\?.*\e\\[D/\\1/g' \
The other way is to use token concatenation, using '' for the bulk of
the string and $'' only for \e, although I don't know if it reads any
better:
sed -e 's/^\((qemu) \)\?.*'$'\e''\[D/\1/g' \
With that line fixed (by either style),
Reviewed-by: Eric Blake <[email protected]>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
