taskd/clone.sh: clean up more crud on exceeds limit failures
commitfe9538746cb1c974c528df5f978243907dbfae1d
authorKyle J. McKay <mackyle@gmail.com>
Wed, 2 Sep 2020 21:51:10 +0000 (2 14:51 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Wed, 2 Sep 2020 21:51:10 +0000 (2 14:51 -0700)
tree96a95ee8fdd8377d5578ae90b20424a77cb8911b
parent83ea8759297b463dda9addca7e55cea94874d98d
taskd/clone.sh: clean up more crud on exceeds limit failures

Refactor part of the cleanup_failed_clone function into a new,
internal _cleanup_failed_clone_bloat function that can be reused
and which is responsible for removing any "crud" files that
might potentially use a non-trivial amount of space.

Call the new _cleanup_failed_clone_bloat from the cleanup_failed_clone
to make it retain exactly the same semantics as before.

Add a call to the new _cleanup_failed_clone_bloat function from the
clear_all_objects_and_packs function so that any exceeds-limit
clones immediately remove potentially bloating files at the same
time they remove their objects and refs.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
taskd/clone.sh