[JGIT PATCH 09/11] Expose the Repository's ObjectDatabase object
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jul 11, 2009, 20:19 UTC
- Message-ID
- <1247343566-19025-10-git-send-email-spearce@spearce.org>
- In-Reply-To
- <1247343566-19025-9-git-send-email-spearce@spearce.org>
Some code may need direct access to the database reference; this actually should be preferred over direct access to the objects directory as the database is a much more abstract concept.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org> --- .../src/org/spearce/jgit/lib/Repository.java | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java b/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java index e3ac01b..1076fe1 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java @@ -187,6 +187,13 @@ public File getObjectsDirectory() { } /** + * @return the object database which stores this repository's data. + */ + public ObjectDatabase getObjectDatabase() { + return objectDatabase; + } + + /** * @return the configuration of this repository */ public RepositoryConfig getConfig() {
-- 1.6.4.rc0.117.g28cb