pretty: minor bugfixing, some refactorings
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 13 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | pretty: tighten function signature to not take `void *`pretty.c | +1 | 1 reply | |
| 2/8 | pretty: simplify if-else to reduce code duplicationpretty.c | +2 | 3 replies | |
| 3/8 | pretty: collect padding-related fields in separate structpretty.c | +23 | 0 replies | |
| 4/8 | pretty: fix parsing of half-valid "%<" and "%>" placeholderspretty.c t/ | +18 | 3 replies | |
| 5/8 | pretty: after padding, reset padding infopretty.c t/ | +11 | 2 replies | |
| 6/8 | pretty: refactor parsing of line-wrapping "%w" placeholderpretty.c | +76 | 2 replies | |
| 7/8 | pretty: refactor parsing of magicpretty.c | +42 | 2 replies | |
| 8/8 | pretty: refactor parsing of decoration optionspretty.c | +30 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/8] pretty: minor bugfixing, some refactorings
Hi,
I've been going through pretty.c with an eye to pulling apart parsing of placeholders and formatting of strings. These are some initial cleanups I've accumulated in the process. I think they should be valuable on their own, even if I eventually abandon the bigger project.
Martin Ågren (8):
pretty: tighten function signature to not take void *
pretty: simplify if-else to reduce code duplication
Two more or less simple cleanups.
pretty: collect padding-related fields in separate struct
pretty: fix parsing of half-valid "%<" and "%>" placeholders
pretty: after padding, reset padding info
Fix a bug or two in parsing and handling of padding placeholders.
pretty: refactor parsing of line-wrapping "%w" placeholder
pretty: refactor parsing of magic
pretty: refactor parsing of decoration options
Further splitting without any intended changes in behavior. These refactorings aren't followed by any patch that actually benefits from them. Still, I do think these end up making the code a tiny bit easier to understand by way of having smaller functions and collecting related pieces of data into smaller structs.
Unless the original authors are (TTBOMK) no longer around, I'm cc-ing them on the individual patches and on this cover letter.
Martin
pretty.c | 300 +++++++++++++++++++++------------- t/t4205-log-pretty-formats.sh | 15 ++ 2 files changed, 197 insertions(+), 118 deletions(-)
Signature · 1 line
2.49.0.472.ge94155a9ec