]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Revamp com_prune().
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 1 Sep 2019 17:34:54 +0000 (19:34 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 21 Sep 2019 13:11:09 +0000 (15:11 +0200)
The prune subcommand implements its own logic for picking the snapshot
to remove. The algorithm is similar but not identical to how the run
subcommand gets rid of snapshots.

This patch eliminates this inconsistency by changing com_prune()
to call the find_removable_snapshot() helper which was introduced in
the previous commit.

Since find_removable_snapshot() returns a dynamically allocated string
via the "why" pointer, we have to introduce another label for freeing
this memory.

The patch also improves the help text of the prune subcommand slightly.


No differences found