diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-19 04:12:15 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-19 04:12:15 -0500 |
commit | 0dc018fe0826b1cbddafebb214993eb2f1240333 (patch) | |
tree | 10ea6bf20f05c186de0da11e567c60a645f3204c /cmd_debug.c | |
parent | a5cf18ffd43106b3db3c23d6dbe72f92c07e9f11 (diff) |
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>
Diffstat (limited to 'cmd_debug.c')
-rw-r--r-- | cmd_debug.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd_debug.c b/cmd_debug.c index 9238e8be..d871af07 100644 --- a/cmd_debug.c +++ b/cmd_debug.c @@ -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); } |