]> source.dussan.org Git - jgit.git/commit
GC: Remove empty references folders 88/116788/5
authorHector Caballero <hector.caballero@ericsson.com>
Mon, 5 Feb 2018 13:58:46 +0000 (08:58 -0500)
committerHector Oswaldo Caballero <hector.caballero@ericsson.com>
Wed, 7 Feb 2018 23:37:12 +0000 (18:37 -0500)
commit93654f75a25d9af193731a97d2db675f57cc86bb
treee2d60400b80320552a4391f5507d2251f6db549d
parentab1b97234ded461407b163b178a592cdabe66930
GC: Remove empty references folders

After packaging references, the folders containing these references are
not deleted. In a busy repository, this causes operations to slow down
as traversing the references tree becomes longer.

Delete empty reference folders after the loose references have been
packed.
To avoid deleting a folder that was just created by another concurrent
operation, only delete folders that were not modified in the last 30
seconds.

Signed-off-by: Hector Oswaldo Caballero <hector.caballero@ericsson.com>
Change-Id: Ie79447d6121271cf5e25171be377ea396c7028e0
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcDeleteEmptyRefsFoldersTest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java