diff options
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java index f55e15f5f9..9c048da40e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java @@ -1164,7 +1164,7 @@ public class GC { /** * @return {@code true} if number of packs > gc.autopacklimit (default 50) */ - private boolean tooManyPacks() { + boolean tooManyPacks() { int autopacklimit = repo.getConfig().getInt( ConfigConstants.CONFIG_GC_SECTION, ConfigConstants.CONFIG_KEY_AUTOPACKLIMIT, @@ -1183,7 +1183,7 @@ public class GC { * * @return {@code true} if number of loose objects > gc.auto (default 6700) */ - private boolean tooManyLooseObjects() { + boolean tooManyLooseObjects() { int auto = repo.getConfig().getInt(ConfigConstants.CONFIG_GC_SECTION, ConfigConstants.CONFIG_KEY_AUTO, DEFAULT_AUTOLIMIT); if (auto <= 0) { @@ -1204,9 +1204,9 @@ public class GC { .matches(); } })) { - Iterator<Path> iter = stream.iterator(); - while (iter.hasNext()) { - if (n++ > threshold) { + for (Iterator<Path> iter = stream.iterator(); iter.hasNext(); + iter.next()) { + if (++n > threshold) { return true; } } |