Browse Source

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>
stable-0.9
Shawn O. Pearce 14 years ago
parent
commit
6a51d97948
  1. 4
      org.eclipse.jgit/src/org/eclipse/jgit/lib/Commit.java
  2. 4
      org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java

4
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 * 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 * commit and want precise control over its fields. For a higher level interface
* see {@link org.eclipse.jgit.api.CommitCommand}. * 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 { public class Commit {
private static final ObjectId[] EMPTY_OBJECTID_LIST = new ObjectId[0]; private static final ObjectId[] EMPTY_OBJECTID_LIST = new ObjectId[0];

4
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 * Applications should use this object when they need to manually construct a
* tag and want precise control over its fields. * 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 { public class Tag {
private ObjectId tagId; private ObjectId tagId;

Loading…
Cancel
Save