summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHan-Wen NIenhuys <hanwen@google.com>2023-02-01 04:15:44 -0500
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2023-02-01 04:15:44 -0500
commit66b871b777c1a58337e80dd03db68bb76b145a93 (patch)
tree0143bd89ec9302f07b57b8116a644524449b00ce
parent580cb13f21ec0685a8a425d75a19a6dd78999acc (diff)
parent0f3a3fde95b59f4832c3ad4234f7c3f00e06e7a4 (diff)
downloadjgit-66b871b777c1a58337e80dd03db68bb76b145a93.tar.gz
jgit-66b871b777c1a58337e80dd03db68bb76b145a93.zip
Merge "Move MemRefDatabase creation in a separate method."
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java
index 5a8207ed01..583b8b3f6b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java
@@ -66,7 +66,16 @@ public class InMemoryRepository extends DfsRepository {
InMemoryRepository(Builder builder) {
super(builder);
objdb = new MemObjDatabase(this);
- refdb = new MemRefDatabase();
+ refdb = createRefDatabase();
+ }
+
+ /**
+ * Creates a new in-memory ref database.
+ *
+ * @return a new in-memory reference database.
+ */
+ protected MemRefDatabase createRefDatabase() {
+ return new MemRefDatabase();
}
/** {@inheritDoc} */