[EGIT PATCH 05/31] Fix RefSpec javadoc regarding spec expanding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We can give expandSource() a wildcard as argument, so it will produce
new wildcard spec, which is still correct.

Signed-off-by: Marek Zawirski <marek.zawirski@xxxxxxxxx>
---
 .../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

--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux