From be7c6d467e8cc4104e1a15e8ff2d7b207624c685 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Tue, 6 Jul 2010 19:29:19 -0400 Subject: pack-refs: remove newly empty directories In a large repository which uses directories to organize many refs, "git pack-refs --all --prune" does not improve performance so much as it should, unless we remove all the now-empty directories as well. Signed-off-by: Greg Price Signed-off-by: Junio C Hamano --- t/t3210-pack-refs.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 't') diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh index 525174013c..cd04361df8 100755 --- a/t/t3210-pack-refs.sh +++ b/t/t3210-pack-refs.sh @@ -60,6 +60,12 @@ test_expect_success 'see if git pack-refs --prune remove ref files' ' ! test -f .git/refs/heads/f ' +test_expect_success 'see if git pack-refs --prune removes empty dirs' ' + git branch r/s/t && + git pack-refs --all --prune && + ! test -e .git/refs/heads/r +' + test_expect_success \ 'git branch g should work when git branch g/h has been deleted' \ 'git branch g/h && -- cgit v1.2.3