print snapshot tree: reduce indentation delta per level

previous:

> `-> foo                         2021-05-28 12:59:36 no-description
>   `-> bar                       2021-06-18 12:44:48 no-description
>     `-> current                                     You are here!

now:

> `-> foo                         2021-05-28 12:59:36 no-description
>  `-> bar                        2021-06-18 12:44:48 no-description
>   `-> current                                       You are here!

So requires less space, allowing deeper snapshot trees to still be
displayed nicely, and looks even better while doing that - the latter
may be subjective though.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-03-01 13:06:21 +01:00
parent 9fca8f9d5e
commit e6e1550049

View File

@ -161,7 +161,7 @@ sub print_snapshot_tree {
printf("%s %-${len}s %-23s %s\n", $prefix, $root, $timestring, $description);
if ($e->{children}) {
$prefix = " $prefix";
$prefix = " $prefix";
foreach my $child (sort $snaptimesort @{$e->{children}}) {
$snapshottree_weak->($prefix, $child, $snapshots);
}