list_journal: Improve formatting

log journal entries denote the start of a transaction commit - let's
indent them differently

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2022-02-19 04:12:15 -05:00
parent a5cf18ffd4
commit 0dc018fe08

View File

@ -615,7 +615,12 @@ int cmd_list_journal(int argc, char *argv[])
vstruct_for_each(&p->j, entry) {
buf = PBUF(_buf);
printbuf_indent_push(&buf, 4);
/*
* log entries denote the start of a new transaction
* commit:
*/
printbuf_indent_push(&buf,
entry->type == BCH_JSET_ENTRY_log ? 2 : 4);
bch2_journal_entry_to_text(&buf, c, entry);
printf("%s\n", _buf);
}