[PATCH JGit 03/19] Add abstract method for updating the object db's info cache Implemented passthrough on Alternate for the update of infocache
From: mike.gaffney <mike.gaffney@asolutions.com>
---
.../jgit/lib/AlternateRepositoryDatabase.java | 5 +++++
.../src/org/spearce/jgit/lib/ObjectDatabase.java | 7 +++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java b/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java
index 68ad488..5cb0579 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java
@@ -130,4 +130,9 @@ protected void closeAlternates(final ObjectDatabase[] alt) {
public List<PackFile> listLocalPacks() {
return odb.listLocalPacks();
}
+
+ @Override
+ public void updateInfoCache() {
+ odb.updateInfoCache();
+ }
}
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java
index 722c802..68ff523 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java
@@ -75,6 +75,13 @@ protected ObjectDatabase() {
public abstract List<PackFile> listLocalPacks();
/**
+ * Creates the caches that are typically done by
+ * update-server-info, namely objects/info/packs and
+ * info/refs
+ */
+ public abstract void updateInfoCache();
+
+ /**
* Does this database exist yet?
*
* @return true if this database is already created; false if the caller
--
1.6.4.2