From: Marek Zawirski Date: Sun, 17 Aug 2008 20:43:46 GMT Subject: [EGIT PATCH 05/31] Fix RefSpec javadoc regarding spec expanding Message-ID: <1219005852-21496-6-git-send-email-marek.zawirski@gmail.com> In-Reply-To: <1219005852-21496-5-git-send-email-marek.zawirski@gmail.com> We can give expandSource() a wildcard as argument, so it will produce new wildcard spec, which is still correct. Signed-off-by: Marek Zawirski --- .../src/org/spearce/jgit/transport/RefSpec.java | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/RefSpec.java b/org.spearce.jgit/src/org/spearce/jgit/transport/RefSpec.java index 25d5977..e489233 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/transport/RefSpec.java +++ b/org.spearce.jgit/src/org/spearce/jgit/transport/RefSpec.java @@ -331,8 +331,11 @@ public class RefSpec { * otherwise expansion results may be unpredictable. * * @param r - * a ref name that matched our source specification. - * @return a new specification that is not a wildcard. + * a ref name that matched our source specification. Could be a + * wildcard also. + * @return a new specification expanded from provided ref name. Result + * specification is wildcard if and only if provided ref name is + * wildcard. */ public RefSpec expandFromSource(final String r) { return isWildcard() ? new RefSpec(this, r) : this; @@ -345,8 +348,11 @@ public class RefSpec { * otherwise expansion results may be unpredictable. * * @param r - * a ref that matched our source specification. - * @return a new specification that is not a wildcard. + * a ref that matched our source specification. Could be a + * wildcard also. + * @return a new specification expanded from provided ref name. Result + * specification is wildcard if and only if provided ref name is + * wildcard. */ public RefSpec expandFromSource(final Ref r) { return isWildcard() ? new RefSpec(this, r.getName()) : this; -- 1.5.6.3