Log directories created by reference deletions
Reference deletions may create directories. This is because Git needs to create missing directories in order to lock a reference. After the deletion, it would clean up the empty directories. However, some directories are special cased by Git to never be cleaned up even if empty. This includes 'refs/heads', 'refs/tags' and also 'refs/remotes'. As we're not logging the creation of these directories, we may end up producing incorrect log entries that do not create the parent directory before creating a child directory in it. We're currently hitting this issue on staging where repository mirroring is triggering this case and crashing a partition due to the missing 'refs/remotes' directory.
Fix the issue by logging directories created by reference deletions.
Closes #6121 (closed)