[PATCH 0/5] pretty format %(trailers): improve machine readability
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Dec 5, 2020, 01:39 UTC
- Message-ID
- <20201205013918.18981-1-avarab@gmail.com>
- In-Reply-To
- <20201025212652.3003036-1-anders@0x63.nu>
I started writing this on top of "master", but then saw the outstanding series of other miscellaneous fixes to this facility[1]. This is on top of that topic & rebased on master.
Anders, any plans to re-roll yours? Otherwise the conflicts I'd have on mine are easy to fix, so I can also submit it as a stand-alone.
This series comes out of a discussion at work today (well, yesterday at this point) where someone wanted to parse %(trailers) output. As noted in 3/5 doing this is rather tedious now if you're trying to unambiguously grap trailers as a stream of key-value pairs.
So this series adds a "key_value_separator" and "keyonly" parameters, and fixes a few bugs I saw along the way.
1. https://lore.kernel.org/git/20201025212652.3003036-1-anders@0x63.nu/
Ævar Arnfjörð Bjarmason (5): pretty format %(trailers) test: split a long line pretty format %(trailers): avoid needless repetition pretty format %(trailers): add a "keyonly" pretty-format %(trailers): fix broken standalone "valueonly" pretty format %(trailers): add a "key_value_separator"
Documentation/pretty-formats.txt | 33 ++++++++------- pretty.c | 12 ++++++ t/t4205-log-pretty-formats.sh | 71 +++++++++++++++++++++++++++++++- trailer.c | 14 +++++-- trailer.h | 3 ++ 5 files changed, 113 insertions(+), 20 deletions(-)
-- 2.29.2.222.g5d2a92d10f8