Robin Rosenberg <robin.rosenberg@xxxxxxxxxx> wrote: > For packed refs we got peeling automatically from packed-refs, > but for loose tags we have to follow the tags and get the leaf > object in order to comply with the documentation. I merged your series, but I squashed the following into the patch I am replying to: .../src/org/spearce/jgit/lib/Repository.java | 12 ++++++++---- 1 files 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 5088150..c953531 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 String getBranch() throws IOException { } /** - * 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. + * <p> + * 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 <code>ref</code> if <code>ref.isPeeled()</code> 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); -- 1.6.0.4.969.g58a38 -- Shawn. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html