]> source.dussan.org Git - jgit.git/commit
Fix GC.deleteEmptyRefsFolders 09/135809/3
authorMatthias Sohn <matthias.sohn@sap.com>
Sun, 27 Jan 2019 01:22:34 +0000 (02:22 +0100)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Mon, 28 Jan 2019 07:04:45 +0000 (02:04 -0500)
commit8cad84ccfbca7d9a3865c090e971c64700fd2ad5
tree44d8ddc3488dd311760f94f5ed69be013e793aa8
parente7b4d108e19913362e92b17fa6ad5b7c9afba23f
Fix GC.deleteEmptyRefsFolders

This method tried to iterate spurious files which may exist in the
.git/refs folder, e.g. on Mac a .DS_Store may have been created there by
inspecting the folder using the finder application. This led to a
NotDirectoryException when deleteEmptyRefsFolders tried to create an
iterator for such a file entry. Skip files contained in the refs folder
to ensure the method only tries to iterate contained folders but not
files.

Change-Id: I5f31e733072a35db1e93908a9c69a8891ae5c206
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcDeleteEmptyRefsFoldersTest.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java