From 1b93c4ed3008fe4ebb475f4a21620aaa8a8e97be Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sun, 16 Nov 2008 14:34:45 -0800 Subject: [PATCH] Correct Javadoc for Repository.peel() Signed-off-by: Shawn O. Pearce --- org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 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 5088150d..c9535312 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java @@ -942,13 +942,17 @@ public class Repository { } /** - * Peel a possibly unpeeled ref and updates it. If the ref cannot be peeled - * the peeled id is set to {@link ObjectId#zeroId()} + * Peel a possibly unpeeled ref and updates it. + *

+ * If the ref cannot be peeled (as it does not refer to an annotated tag) + * the peeled id stays null, but {@link Ref#isPeeled()} will be true. * * @param ref * The ref to peel - * @return The same, an updated ref with peeled info or a new instance with - * more information + * @return ref if ref.isPeeled() is true; else a + * new Ref object representing the same data as Ref, but isPeeled() + * will be true and getPeeledObjectId will contain the peeled object + * (or null). */ public Ref peel(final Ref ref) { return refs.peel(ref); -- 2.11.4.GIT