Its more flexible for future additions to the parameters. Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx> --- .../spearce/egit/core/project/GitProjectData.java | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/org.spearce.egit.core/src/org/spearce/egit/core/project/GitProjectData.java b/org.spearce.egit.core/src/org/spearce/egit/core/project/GitProjectData.java index 8b72818..31d5483 100644 --- a/org.spearce.egit.core/src/org/spearce/egit/core/project/GitProjectData.java +++ b/org.spearce.egit.core/src/org/spearce/egit/core/project/GitProjectData.java @@ -42,6 +42,7 @@ import org.spearce.egit.core.GitProvider; import org.spearce.jgit.lib.Repository; import org.spearce.jgit.lib.WindowCache; +import org.spearce.jgit.lib.WindowCacheConfig; /** * This class keeps information about how a project is mapped to @@ -229,12 +230,13 @@ private synchronized static Repository lookupRepository(final File gitDir) * Update the settings for the global window cache of the workspace. */ public static void reconfigureWindowCache() { + final WindowCacheConfig c = new WindowCacheConfig(); Preferences p = Activator.getDefault().getPluginPreferences(); - int wLimit = p.getInt(GitCorePreferences.core_packedGitLimit); - int wSize = p.getInt(GitCorePreferences.core_packedGitWindowSize); - boolean mmap = p.getBoolean(GitCorePreferences.core_packedGitMMAP); - int dbLimit = p.getInt(GitCorePreferences.core_deltaBaseCacheLimit); - WindowCache.reconfigure(wLimit, wSize, mmap, dbLimit); + c.setPackedGitLimit(p.getInt(GitCorePreferences.core_packedGitLimit)); + c.setPackedGitWindowSize(p.getInt(GitCorePreferences.core_packedGitWindowSize)); + c.setPackedGitMMAP(p.getBoolean(GitCorePreferences.core_packedGitMMAP)); + c.setDeltaBaseCacheLimit(p.getInt(GitCorePreferences.core_deltaBaseCacheLimit)); + WindowCache.reconfigure(c); } private final IProject project; -- 1.6.2.1.286.g8173 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html