summaryrefslogtreecommitdiff
path: root/contrib/mw-to-git/t/test-gitmw.pl
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2017-01-06 17:22:43 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-01-07 19:30:09 -0800
commit446397774ad3b9f2ae81bcfbe0628e99c3db7e49 (patch)
tree77b9ed150e5968e02586b58deb0a8aaabd1d6d2b /contrib/mw-to-git/t/test-gitmw.pl
parenttry_remove_empty_parents(): teach to remove parents of reflogs, too (diff)
downloadtgif-446397774ad3b9f2ae81bcfbe0628e99c3db7e49.tar.xz
files_transaction_commit(): clean up empty directories
When deleting/pruning references, remove any directories that are made empty by the deletion of loose references or of reflogs. Otherwise such empty directories can survive forever and accumulate over time. (Even 'pack-refs', which is smart enough to remove the parent directories of loose references that it prunes, leaves directories that were already empty.) And now that files_transaction_commit() takes care of deleting the parent directories of loose references that it prunes, we don't have to do that in prune_ref() anymore. This change would be unwise if the *creation* of these directories could race with our deletion of them. But the earlier changes in this patch series made the creation paths robust against races, so now it is safe to tidy them up more aggressively. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/mw-to-git/t/test-gitmw.pl')
0 files changed, 0 insertions, 0 deletions