]> source.dussan.org Git - jgit.git/commit
GC: Remove empty references folders 47/125747/4
authorHector Caballero <hector.caballero@ericsson.com>
Mon, 5 Feb 2018 13:58:46 +0000 (08:58 -0500)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Tue, 10 Jul 2018 11:24:59 +0000 (20:24 +0900)
commit4eea4ea508900c35b2f200d36e3342b8198a8026
treee7f496e15930e42a43cdd8dfb1fb9202d468107c
parent5a8ad44208c8b711077b9235839b66cd50803ede
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
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
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