aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-08-23 09:40:41 -0700
committerShawn O. Pearce <spearce@spearce.org>2010-08-23 09:40:41 -0700
commit6a51d97948a29c262c5b506466425c3169a56947 (patch)
treeec5b7ad30372daaa47fa019adedb7582a7254084
parent5fc990130bbd3cf3a0d505c0e12132ec0ecd6b75 (diff)
downloadjgit-6a51d97948a29c262c5b506466425c3169a56947.tar.gz
jgit-6a51d97948a29c262c5b506466425c3169a56947.zip
Add documentation explaining how to read Commit and Tag
Since we stopped supporting these types for reading, but their name is a natural candidate for someone to try and use in code, explain where they should be looking instead. Change-Id: I091a1b0ef71b842016020f938ba3161431aab9c9 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Commit.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Commit.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Commit.java
index ebf75f92b9..8fc46c915c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Commit.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Commit.java
@@ -54,6 +54,10 @@ import java.util.List;
* Applications should use this object when they need to manually construct a
* commit and want precise control over its fields. For a higher level interface
* see {@link org.eclipse.jgit.api.CommitCommand}.
+ *
+ * To read a commit object, construct a {@link org.eclipse.jgit.revwalk.RevWalk}
+ * and obtain a {@link org.eclipse.jgit.revwalk.RevCommit} instance by calling
+ * {@link org.eclipse.jgit.revwalk.RevWalk#parseCommit(AnyObjectId)}.
*/
public class Commit {
private static final ObjectId[] EMPTY_OBJECTID_LIST = new ObjectId[0];
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java
index fbd22c36be..fda6b1cb1b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java
@@ -52,6 +52,10 @@ import org.eclipse.jgit.revwalk.RevObject;
*
* Applications should use this object when they need to manually construct a
* tag and want precise control over its fields.
+ *
+ * To read a tag object, construct a {@link org.eclipse.jgit.revwalk.RevWalk}
+ * and obtain a {@link org.eclipse.jgit.revwalk.RevTag} instance by calling
+ * {@link org.eclipse.jgit.revwalk.RevWalk#parseTag(AnyObjectId)}.
*/
public class Tag {
private ObjectId tagId;