Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java
index de0c55f651..48fc39b4f6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java
@@ -177,6 +177,16 @@ public abstract class ObjectInserter {
}
/**
+ * Compute the ObjectId for the given tree without inserting it.
+ *
+ * @param formatter
+ * @return the computed ObjectId
+ */
+ public ObjectId idFor(TreeFormatter formatter) {
+ return formatter.computeId(this);
+ }
+
+ /**
* Insert a single tree into the store, returning its unique name.
*
* @param formatter

Back to the top