summaryrefslogtreecommitdiff
path: root/t/t3210-pack-refs.sh
diff options
context:
space:
mode:
authorGreg Price <price@ksplice.com>2010-07-06 19:29:19 -0400
committerJunio C Hamano <gitster@pobox.com>2010-07-07 09:11:37 -0700
commitbe7c6d467e8cc4104e1a15e8ff2d7b207624c685 (patch)
treecb23a29c9a86b0017534892ed0db31e9fe821541 /t/t3210-pack-refs.sh
parent78db709ae59da26de76264b79df3a7dc4d87e65c (diff)
downloadgit-be7c6d467e8cc4104e1a15e8ff2d7b207624c685.tar.gz
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 <price@ksplice.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3210-pack-refs.sh')
-rwxr-xr-xt/t3210-pack-refs.sh6
1 files changed, 6 insertions, 0 deletions
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 &&