]> source.dussan.org Git - jgit.git/commit
Do not update the ref hot bit when checking isIndexLoaded 62/18362/1
authorColby Ranger <cranger@google.com>
Wed, 13 Nov 2013 23:19:03 +0000 (15:19 -0800)
committerColby Ranger <cranger@google.com>
Wed, 13 Nov 2013 23:19:03 +0000 (15:19 -0800)
commitf3b80f1a7417591eb0ad7fa2b212a0588f987441
tree1ff88dc65a02f5d2bae5e252be35167b175d4e6a
parent371e1a02bd049a7ff5bc6d6936fb1b7e296f26d3
Do not update the ref hot bit when checking isIndexLoaded

DfsPackFile.isIndexLoaded() uses the DfsBlockCache.Ref.get() method
to check if the index loaded. However, using the get() method marks
a hot bit in the cache, which can cause the index to never be unloaded
and seem hotter than it really is. Add a has() method which only
checks if the value is not null and does not update the hot bit.

Change-Id: I7e9ed216f6e273e8f5d79ae573973197654419b4
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java