From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg@dewire.com>
Cc: git@vger.kernel.org
Subject: Re: [EGIT PATCH 4/7 v3] Handle peeling of loose refs.
Date: Sun, 16 Nov 2008 14:37:23 -0800 [thread overview]
Message-ID: <20081116223723.GJ2932@spearce.org> (raw)
In-Reply-To: <1226705099-18066-4-git-send-email-robin.rosenberg@dewire.com>
Robin Rosenberg <robin.rosenberg@dewire.com> 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.
next prev parent reply other threads:[~2008-11-16 22:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-07 22:07 [J/E-GIT PATCH 0/7] Tag decoration v2 Robin Rosenberg
2008-11-07 22:07 ` [EGIT PATCH 1/7] Test the origName part of the key vs the ref itself Robin Rosenberg
2008-11-07 22:07 ` [EGIT PATCH 2/7] Add constant for "refs/" Robin Rosenberg
2008-11-07 22:07 ` [EGIT PATCH 3/7] Keep original ref name when reading refs Robin Rosenberg
2008-11-07 22:07 ` [EGIT PATCH 4/7] Handle peeling of loose refs Robin Rosenberg
2008-11-07 22:07 ` [EGIT PATCH 5/7] Add a method to get refs by object Id Robin Rosenberg
2008-11-07 22:07 ` [EGIT PATCH 6/7] Add tags to the graphical history display Robin Rosenberg
2008-11-07 22:07 ` [EGIT PATCH 7/7] Add decorate option to log program Robin Rosenberg
2008-11-11 18:28 ` [EGIT PATCH 6/7] Add tags to the graphical history display Shawn O. Pearce
2008-11-14 0:49 ` Robin Rosenberg
2008-11-11 18:32 ` Shawn O. Pearce
2008-11-14 23:24 ` [EGIT PATCH 1/7 v3] Add constant for "refs/" Robin Rosenberg
2008-11-14 23:24 ` [EGIT PATCH 2/7 v3] Keep original ref name when reading refs Robin Rosenberg
2008-11-14 23:24 ` [EGIT PATCH 3/7 v3] Test the origName part of the key vs the ref itself Robin Rosenberg
2008-11-14 23:24 ` [EGIT PATCH 4/7 v3] Handle peeling of loose refs Robin Rosenberg
2008-11-14 23:24 ` [EGIT PATCH 5/7 v3] Add a method to get refs by object Id Robin Rosenberg
2008-11-16 22:37 ` Shawn O. Pearce [this message]
2008-11-11 18:26 ` [EGIT PATCH 5/7] " Shawn O. Pearce
2008-11-11 18:23 ` [EGIT PATCH 4/7] Handle peeling of loose refs Shawn O. Pearce
2008-11-14 0:38 ` Robin Rosenberg
2008-11-11 18:05 ` [EGIT PATCH 1/7] Test the origName part of the key vs the ref itself Shawn O. Pearce
2008-11-13 22:13 ` Robin Rosenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081116223723.GJ2932@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=robin.rosenberg@dewire.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.