aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
index 0cbb83d6e2..8bcf4bf3e0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
@@ -249,7 +249,15 @@ public class DirCacheTree {
return children[i];
}
- ObjectId getObjectId() {
+ /**
+ * Get the tree's ObjectId.
+ * <p>
+ * If {@link #isValid()} returns false this method will return null.
+ *
+ * @return ObjectId of this tree or null.
+ * @since 4.3
+ */
+ public ObjectId getObjectId() {
return id;
}